I have set my environment variables LANG="en_AU.UTF-8" LC_CTYPE="zh_CN.UTF-8"
/usr/bin/locale reports these as being set correctly. LC_ALL is not set.
I have made the locales localedef -i en_AU -f UTF-8 en_AU.UTF-8 localedef -i zh_CN -f UTF-8 zh_CN.UTF-8
locale -a reports that they exist (amongst all the others of course) en_AU.utf8 zh_CN.utf8
However when I try to run gtk or qt apps they complain: Gdk-WARNING **: locale not supported by Xlib Qt: Locales not supported on X server
looking at the source code for gtk and for qt these error messages are in both cases the result of XSupportsLocale() returning FALSE.
If I unset LC_CTYPE however there are no errors so it would seem that it is the Chinese locale that is the problem.
Googling for this turned up two possible causes for unsupported UTF-8 locales:
1) Xlib is too old (message dated 2001)
2) corrupt /usr/X11R6/lib/X11/locale/locale.aliases
The first reason seems unlikely to me as I am using XFree86 4.3.0 and it has a zh_CN.UTF-8 locale in it.
I looked at the aliases files but I think it shouldn't be the problem as I am not using an alias for the locale. But this suggested that there could be an issue with locale.dir file.
It has the following line in it
zh_CN.UTF-8/XLC_LOCALE zh_CN.UTF-8
and the XLC_LOCALE file exists in the zh_CN.UTF-8 directory
So this makes me think it should be ok. However my understanding of these Xlib internals is pretty limited so I could be wrong.
I am using XFree86 4.3.0, glibc 2.3.2, gcc 3.3.2 on gentoo linux. I am also using the xfs font server.
So now I am stuck. Does anyone have some ideas of useful tests or potential solutions? Any help much appreciated.
Greg Aumann
-- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
