1 May 2000 19:25
Re: wcwidth() implementation
Florian Weimer <fw <at> deneb.cygnus.argh.org>
2000-05-01 17:25:51 GMT
2000-05-01 17:25:51 GMT
Markus Kuhn <Markus.Kuhn <at> cl.cam.ac.uk> writes:
> Attached is my public domain implementation of the wcwidth() and
> wcswidth() functions. I hope you will find it useful for inclusion into
> glibc, xterm, etc. The function wcwidth() distinguishes between normal,
> wide, and combining characters, and wcswidth() can be used to predict
> how many columns a string sent to a terminal emulator such as xterm will
> occupy on the screen.
Hmm. Your implementation restricts wide characters mainly to the
East-Asia regions. But there are many characters which you can hardly
display using normal glyphs, for example:
∰ U+2230 VOLUME INTEGRAL
⒛ U+249B NUMBER TWENTY FULL STOP
⒨ U+24A8 PARENTHESIZED LATIN SMALL LETTER M
ffl U+FB04 LATIN SMALL LIGATURE FFL
I think wcwidth() could even return 3 for these characters and many
more. ;)
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/
RSS Feed