[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wcwidth() implementation
Markus Kuhn <Markus.Kuhn@xxxxxxxxxxxx> 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/