[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wcwidth and glibc 2.2



Markus Kuhn writes:

> But why isn't it sufficient to simply use exactly the two conventions
> 
>   wcwidth()
>   wcwidth_cjk()
> 
> as they are now both defined in
> 
>   http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

It is indeed possible to get away with two different tables: one for
the UTF-8 and GB18030 locales, and one for BIG5, CP949, EUC-JP,
EUC-KR, EUC-TW, GB2312, GBK, JOHAB locales.

That's what I deduce from comparison of the wcwidth tables of
glibc-2.2 in various encodings.

But your wcwidth_cjk() function needs more modifications. It differs
from the EUC-JP wcwidth in more than 200 values.

The width table for BIG5HKSCS looks strange; I don't know whether it's
correct.

Bruno
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/