Subject: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale

From: Ludovic Courtès <[email-masked]>
Date: Tue, 14 May 2019 22:57:45 +0200

Hi,

Meiyo Peng <[email-masked]> skribis:

> I was surprised last week (maybe the week before that) when I found out
> that glibc-utf8-locales only provides locales for de_DE, el_GR, en_US,
> fr_FR, tr_TR.  And in our manual, we tell people to install
> glibc-utf8-locales after installing Guix on a foreign distro in order to
> solve locale problems.  The name "glibc-utf8-locales" indicates it
> provides ALL UTF-8 locales while in fact it does not.  This caused me a
> trouble because I have to set the locale of Emacs to zh_CN.UTF-8 in
> order to enable the ibus input method in Emacs.  (This is a known
> problem of Emacs.  Locale has to be set to one of CJK locale in order to
> enable external input methods.)  Since the zh_CN.UTF-8 locale is not in
> $GUIX_LOCPATH, ibus does not work in Emacs.  I ended up installing the
> "glibc-locales" package and solved the problem.

To be fair, the manual has always recommended ‘glibc-locales’, not
‘glibc-utf8-locales’, and the latter is explicitly described as “limited
to a few UTF-8 locales”:

  https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup.html

The hint in (guix ui) is less clear, though.

> I think it would be better to simply tell people to install the
> "glibc-locales" package.  There may be a case where different
> applications are set to different locales.  For example, my system is
> set to the en_US.UTF-8 locale but my Emacs is set to the zh_CN.UTF-8
> locale.  So $LC_* only refers to en_US.UTF-8 if guix tries to detect the
> locale.  If ‘guix package --install-locales’ only install what $LANG or
> $LC_* refers to, zh_CN.UTF-8 won't be installed for me.

That command could take a parameter, of course.

See also:
<https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00285.html>.

Thanks for your feedback!

Ludo’.