Is there a definitive way to determine what character
encoding XmbLookupString() is going to return text in?
Right now, I'm expecting the locale string to contain
either SJIS or EUC to tell me which to expect, but that's
not reliable. What if the locale was just ja_JP or even
some other language
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.
Juliusz Chroboczek wrote on 2002-11-12 16:49 UTC:
Use nl_langinfo(3), but it's an SUSv2 interface (i.e. it's not in POSIX)
POSIX.{1,2}:2001 and SUSv4 are the same thing now.
So nl_langinfo(CODESET) is now actually officially part of the holy
dogma of the church of POSIX. Halleluhia.