On Wed, Oct 11, 2023 at 3:22 AM Rob Landley <r...@landley.net> wrote:
>
> On 10/6/23 05:05, Rob Landley wrote:
> > Apparently the widest unicode characters are:
> >
> > 1. ﷽
> >
> > 2. 𒐫
> >
> > 3. 𒈙
> >
> > 4. ⸻
> >
> > 5. ꧅
> >
> > The first 4 of which xfce's terminal does NOT like. And thunderbird fits the
> > first one in 3 columns while vim's giving it... 9 I think.
>
> And trying to add a file with those to the test suite, neither glibc nor musl 
> is
> returning wcwidth() for them (it's all 1). And washing the attempt through
> ltrace it looks like their unicode code points aren't defined in
> https://www.w3.org/TR/xml-entity-names/1D7.html and friends.
>
> Which is odd because the web browser and terminal and so on render them
> properly. But if neither glibc nor musl can handle them, I can't add "fold"
> tests for them, can I? (Haven't tried bionic, but possibly this is what 
> Elliott
> meant when said he used a bigger gui library for this sort of thing...)

yeah, bionic _does_ implement wcwidth() but admits that it's fairly
bogus. if you really care, not even icu4c (my usual answer to such
questions, and something bionic regularly forwards such questions to),
you want to talk to something like
https://en.wikipedia.org/wiki/HarfBuzz instead --- this shit gets
weird, fast. (bionic's wcwidth() just passes on the Unicode
EastAsianWidth property, which isn't _useless_ but it's way too
simplistic a model to handle stuff like this.)

> Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to