Clemens Ladisch <[email protected]>
writes:
> Yuriy M. Kaminskiy wrote:
>> +** Compute a utf-8 string length (in characters rather than bytes)
> Counting characters is an improvement.
>
> But the number of characters is not necessarily the same as the number
> of column positions required to display the string.

That's why I said "a little bit more of"?
utf8_print_width does not handle non-single-width characters, my patch
does not either.

> If you want to handle CJK characters like 幅,

... and then there are also composing, combining and other zero-width
characters, they are not handled too.
And then there are RTL issues, etc.

> you have to call wcwidth(),

Unfortunately, wcwidth() is a little problematic to use correctly...

> or use your own lookup table of full-width characters.

... and that feels a bit too un-lite.

As I said up by thread,
cat >>sqlite3.1
.SH KNOWN BUGS
.B .mode column
does not handle double-width and zero-width characters, patches welcomed.
^D

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to