On Tue, Apr 10, 2018 at 02:17:13AM +0800, Prashanth Chandra wrote: > Hello, > > I'm getting "unsupported locale" warnings and crashes when running > programs such as xterm or dmenu on a clean install of Ubuntu 17.10 > > Examples: > warning: no locale support > Warning: locale not supported by Xlib, locale set to C > > Here's the offending line from dmenu's source code: > > if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) > fputs("warning: no locale support\n", stderr); > > I'm not 100% sure but I was told that this looks like an issue in XOrg. > Additionally, the problem disappears if I change my default locale to > en_US.UTF-8 instead of en_HK.UTF-8, which suggests that the issue is > specific to my locale. > > Here's the output of running locale: > > LANG=en_HK.UTF-8 > LANGUAGE=en > LC_CTYPE="en_HK.UTF-8" > LC_NUMERIC="en_HK.UTF-8" > LC_TIME="en_HK.UTF-8" > LC_COLLATE="en_HK.UTF-8" > LC_MONETARY="en_HK.UTF-8" > LC_MESSAGES="en_HK.UTF-8" > LC_PAPER="en_HK.UTF-8" > LC_NAME="en_HK.UTF-8" > LC_ADDRESS="en_HK.UTF-8" > LC_TELEPHONE="en_HK.UTF-8" > LC_MEASUREMENT="en_HK.UTF-8" > LC_IDENTIFICATION="en_HK.UTF-8" > LC_ALL= > > Here's the output of running locale -a: > > C > C.UTF-8 > en_HK.utf8 > en_US.utf8 > POSIX > > Would appreciate any pointers in understanding this issue.
1) You could try to change environment to en_HK.utf8 The name is obviously different from en_HK.UTF-8, hoever, this difference should give other diagnostic message. But you can try, it is simple. 2) If not, check all places: /usr/share/X11/locale.dir should contain a line en_US.UTF-8/XLC_LOCALE: en_HK.UTF-8 /usr/share/X11/locale.alias shouldn't contain a line beginning with en_HK.UTF-8: /etc/locale.gen should have uncommented (i.e. without hash mark at the beginning) line en_HK.UTF-8 UTF-8 and /etc/locale.alias shouldn't contain a line beginning with en_HK.UTF-8 > > Prashanth > _______________________________________________ > email@example.com: X.Org support > Archives: http://lists.freedesktop.org/archives/xorg > Info: https://lists.x.org/mailman/listinfo/xorg > Your subscription address: %(user_address)s _______________________________________________ firstname.lastname@example.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s