> There are a couple of libraries called 'libunicode'; but if you mean > the one originally written by Tom Tromey, it should be noted that it > is, for all practical purposes, dead.
yes, i mean that one. > (I took over maintainence from Tom for a while, but then we moved the > interesting parts of libunicode into GLib, and replaced the > portable-iconv parts with libiconv, so stopped using it for > GLib/Pango/GNOME.) right, thanks for the redirect. looking at glib 2.0.4 from gnome ftp, the criticisms are still valid: it doesnt check for overcoded sequences (the UTF8_GET macro (notice that the UNICODE_VALID macro seems essentially useless)) g_utf8_get_char seems to have lost something in the conversion, it no longer gives back an updated pointer, which would be useful for iterating over a utf-8 string. also, its range of error return codes dont give the api user enough information to layout a good error message. And, it has no support for string visible width computation, which could easily be added. lastly, gunichar is unsigned. I was thinking it could be signed for several reasons, such as using negatives for error codes... these functions are in such a fund amental part of the gnome codebase, that it might be a good idea to iron them out, but i dont imagine any changes being accepted before the big release. -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
