[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: Ligatures are removed as one character
From: |
Chet Ramey |
Subject: |
Re: Bug: Ligatures are removed as one character |
Date: |
Fri, 23 Feb 2024 09:52:25 -0500 |
User-agent: |
Mozilla Thunderbird |
On 2/19/24 9:26 PM, Avid Seeker wrote:
When pressing backspace on Arabic ligatures (including characters with
diacritics), they are removed as if they are one character.
As you might guess, readline doesn't know much about Arabic, per se. In a
UTF-8 locale, for example, it knows base characters and combining
characters.
The idea is simple: when moving backwards, move one multibyte character at
a time, ignoring combining characters, until you get to a character for
which wcwidth(x) > 0, and move point there. The algorithm for moving
forward is similar.
How should this be modified to support Arabic in a portable way?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature