> Is wcwidth() actually owned by some standard organization?
   
   I am not sure, what you mean by "owned".
   
   wcwidth() is defined at various places, for example by the X/Open SUS in
   
     http://www.opengroup.org/onlinepubs/007908799/xsh/wcwidth.html
   
   It seems to be commonly considered to be a locale dependent function.
   That makes sense, because EUC, etc. have a width associated with every
   coding position (namely: wcswidth(s) == strlen(s)).

This is incorrect. In some EUC implementations, wcswidth(s) == strlen(s),
but not in others. For example, eucJP when it includes the JIS X0212
characters is defined this way:

Code Set    Number of   Display       Contains
Number      Bytes       Width
--------    ---------   -------       ---------
   0           1          1           ASCII
   1           2          2           JIS X0208; Kanji ideographs
   2           2          1           JIS X0201; katakana
   3           3          2           JIS X0212; supplemental Kanji

Some people might claim that the first bytes for JIS X0201 and
JIS X0212 are single-shift control characters, and so should not be
counted. But strlen() definitely would count them, so there are cases
when wcswidth(s) != strlen(s).

                -- Sandra
-----------------------
Sandra Martin O'Donnell
Compaq Computer Corporation
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to