Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: UNICODE Private Use Area characters in BUFFER
- X-seq: zsh-workers 50813
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: UNICODE Private Use Area characters in BUFFER
- Date: Sun, 23 Oct 2022 19:29:15 +0200
- Archived-at: <https://zsh.org/workers/50813>
- In-reply-to: <CAH+w=7a-8TtMcXvrmq6RLHbU-maHdD1Zf2ck_h_kzK61bmEr_A@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAN=4vMowyKmrQtQb=QTxiVzQJXRubz-o2T12=6aQBHSpkKwOig@mail.gmail.com> <CAHYJk3SWfX7ZaFA=WgDBtSPZD0isV5OUHWgf3ienhzhzK+9xQw@mail.gmail.com> <CAN=4vMoLQBt8ST7E3EachnLra05ENPOiY0nDOC0Z_=a=8Mg4SA@mail.gmail.com> <CAH+w=7a-8TtMcXvrmq6RLHbU-maHdD1Zf2ck_h_kzK61bmEr_A@mail.gmail.com>
On Sun, Oct 23, 2022 at 7:02 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Oct 23, 2022, 9:45 AM Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
>>
>> A few more tests to show that Private Use Area characters work find in
>> zsh with the exception that you cannot put then in BUFFER:
>
>
> I don't have the code handy, but I suspect this is due to the implementation of wisprnt() [sic] returning false for those characters.
You are right, iswprint(0xE0B0) returns 0.
I'm compiling zsh with --enable-unicode9, so instead of iswprint() it
goes into u9_iswprint(). This function explicitly handles this case
and returns 0, just like iswprint(). So we get this:
WCWIDTH(0xE0B0) => 1
WC_ISPRINT(0xE0B0) => 0
I think u9_iswprint() should return 1 for Private Use Area characters.
Roman.
P.S.
Why isn't --enable-unicode9 a default?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author