Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZWJ paste from clipboard problem (unicode)
- X-seq: zsh-users 30243
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Daniil Rozanov <personal@xxxxxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh users <zsh-users@xxxxxxx>
- Subject: Re: ZWJ paste from clipboard problem (unicode)
- Date: Tue, 1 Apr 2025 16:41:06 +0200
- Archived-at: <https://zsh.org/users/30243>
- In-reply-to: <33942-1743506608.001547@3ros.h6PJ.3Nhw>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Oliver Kiddle <opk@xxxxxxx>, Daniil Rozanov <personal@xxxxxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh users <zsh-users@xxxxxxx>
- References: <D8UOVIME9HDS.1I0WLZVJ6FPQ7@rozanov.info> <CAH+w=7atQJ9Hqp=MXpin3CMQ=N_=fvhYs1aWfFh2fpHNLbEvzg@mail.gmail.com> <D8URMP63LOAZ.35Q236JMFWTLZ@rozanov.info> <CAHYJk3Tg7LL2AwjX0CD=CgM2fOVZuiQd85a3TOAyhPB1h9vABw@mail.gmail.com> <D8V5D34J1TWE.3QJ3E59BL2J8X@rozanov.info> <33942-1743506608.001547@3ros.h6PJ.3Nhw>
On 2025-04-01 13:23:27 +0200, Oliver Kiddle wrote:
> The problem for zsh remains that wcwidth is the libc interface that
> provides a way to find a correspondence between wide characters (i.e.
> unicode code points) and graphemes. There's a lot of limitations in
> what libc provides. Most terminals also use wcwidth() so share the same
> limitations meaning that behaviour is at least consistent.
>
> So zsh would need to either depend on some additional external library
> or we need to fetch tables of unicode code points and generate our own
> tables to classify them.
If you mean hard-coded tables (not based on what wcwidth provides),
this is a bad idea. This was what GNU Screen was doing and led to
recurrent display issues, until this got replaced by wcwidth:
https://savannah.gnu.org/bugs/?63634
> libICU is the long-standing C library for this but it's a huge
> monster dating from a time when people expected 16-bits to be
> enough.
[...]
and there seem to be portability issues with libICU.
In the libxml2 Debian changelog:
* Don't build with ICU. Closes: #1092484.
libxml's README.md states:
[ICU](https://icu.unicode.org/), a Unicode library. Mainly
useful as an alternative to iconv on Windows. Unnecessary
on most other systems.
ICU 76.1 requires to be built with -std=c++17 or -std=gnu++17 or
higher. However including the ICU headers in the libxml2 headers,
breaks builds with older C++ standards, most likely leading to
some unrelated build failures for packages that don't rely on ICU,
but are using libxml2.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author