DW> Is there a definitive way to determine what character
DW> encoding XmbLookupString() is going to return text in?

You cannot.  That's the whole point of the CSI ideology.

(Code Set Independence.  n.  The notion that a client is not supposed
to know anything about the character encoding.  Implies that Arabic
doesn't exist.)

Actually, you can.  Use nl_langinfo(3), but it's an SUSv2 interface
(i.e. it's not in POSIX), and its use is frowned upon by true CSI
believers.

DW> Would there be a way to _force_ the encoding to, say 
DW> UTF8?

That's what the Xutf8* functions are designed for.  If you need a
different encoding than UTF-8, use Xutf8* in combination with
iconv(3).

Note that the use of Xutf8* is not portable, as they are only included
in the XFree86 libraries.  A very partial emulation of some Xutf8
functions for legacy implementations of X11 can be found in the
XFree86 tree in xc/programs/xterm/xutf8.c.  Please feel free to
distribute this file with your application (no strings attached,
although I'd expect you to contribute any improvements you make to it
back to XFree86).

Happy CSI hacking,

                                        Juliusz
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to