MR> I'm a newbie in UTF-8 issues, and I need some help: I have a
MR> Motif/Lesstif-based program that I'd like to internationalize and
MR> needs to display a UTF-8 encoded string.
A> Sorry to insist, but I've seen that the venerable xterm solves the
A> problem with only one C code file, xutf8.c
You'll need to write your own Unicode widgets -- that's what XFree86
XTerm does. The xutf8.c file is only there to support UTF-8 selection
conversion (cut & paste), not rendering.
If you want to do the dirty thing, you XOpenQueryFont a
Unicode-encoded font instance (one whose name ends in ``iso10646-1''),
then you do a UTF-8 to UCS-2 conversion yourself, finally you do
XDrawString (or XDrawText16) at the resulting string.
If you're using the XFree86 libs, an alternative is to use
Xutf8DrawText.
I would strongly recommend that you port your application to Gtk+ 2.
Juliusz
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/