Hi Ludovic, Ludovic Courtès writes:
> Meiyo Peng <me...@riseup.net> 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 You are right. My mistake. But when I saw the text: #+begin_quote Note that the glibc-locales package contains data for all the locales supported by the GNU libc and weighs in at around 110 MiB. Alternatively, the glibc-utf8-locales is smaller but limited to a few UTF-8 locales. #+end_quote I thought the glibc-utf8-locales should satisfy my requirements since all my locales are in UTF-8, and it's preferred if disk space is limited. The name of glibc-utf8-locales is misleading. In fact, the "few" UTF-8 locales it provides are too few. We'd better modify the text a little bit if we are going to reach a broader user base. > 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. That makes sense. -- Meiyo Peng https://www.pengmeiyu.com/