Subject: Re: bug#57531: 28.1; Character encoding missing for "eo"

From: Jonathan Reeve <[email-masked]>
Date: Mon, 05 Sep 2022 17:50:01 +0000

In my case, on NixOS, the system only supports glibc locales. [The nix configuration option for locales] says this:

      List of locales that the system should support. The value “all” means that all locales supported by Glibc will be installed. A full list of supported locales can be found at <https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED>.

And if you try to do it anyway, for instance, with this configuration:

┌────
│   i18n = {
│     defaultLocale = "eo.UTF-8";
│     supportedLocales = [ "eo.UTF-8/UTF-8" "eo/UTF-8" "en_US.UTF-8/UTF-8" ];
│   };
└────

you’ll end up getting an error like this:

      Error: unsupported locales detected:
      eo.UTF-8/UTF-8 \
      You should choose from the list above the error.

The “list above the error” is the same list from [the full list of supported locales], and doesn’t include `eo.UTF-8' or `eo.utf-8'.

So on my system, at least, there is effectively no separate `eo.UTF-8' locale. Nor would you need one, since the `eo' locale is UTF-8.

FWIW, my system doesn’t have the obsolete X11 locale.alias file, and I don’t use X11.

But if there’s one thing I can ascertain, just from using my system, is that it works just as expected everywhere (terminals, other programs), and characters are displayed fine everywhere (e.g., in UTF-8, as they should be) /except in emacs/. The emacs terminal, especially, displays characters incorrectly.

Here’s the output of `locale charmap':

┌────
│ $ LANG=eo locale charmap
│ UTF-8
└────

So it seems to me transparently clear that the encoding for the `eo' locale is UTF-8, and yet somehow emacs has its own, separate opinions, which don’t seem to be based on fact.

Changing the default emacs encoding won’t break backwards compatibility so much as it will fix a long-standing mistake.

“Andreas Schwab” <[email-masked]> writes:

> On Sep 05 2022, Eli Zaretskii wrote:
>
>> Is that because locale.alias comes from X11
>
> Nothing else uses that file.

[The nix configuration option for locales] <https://search.nixos.org/options?channel=unstable&show=i18n.supportedLocales&from=0&size=50&sort=relevance&type=packages&query=locale>

[the full list of supported locales] <https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED>