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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 05 Sep 2022 15:24:17 +0300

> Date: Mon, 05 Sep 2022 12:00:12 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked], [email-masked], [email-masked]
> 
> > But AFAIU locale.alias should have told Emacs which encoding is 
> > appropriate for "eo".
> 
> If Emacs relies on locale.alias, Latin-3 will be chosen.  The "eo" locale 
> follows what other locales do, without ".UTF-8" the legacy encoding is 
> used.  E.g. "en_US" is Latin-1 here but "en_US.UTF-8" is UTF-8, and 
> likewise "tr_TR" is Latin-9 but "tr_TR.UTF-8" is UTF-8.

Emacs looks in locale.alias before it uses the fallback info in
language-info-alist.

> > Andreas asked the OP what does locale.alias say about that, but I saw no 
> > response yet.
> >
> > What does "grep ^eo /usr/share/X11/locale/locale.alias" say on your 
> > system?
> >
> 
> eo						eo_XX.ISO8859-3
> eo_XX						eo_XX.ISO8859-3
> eo:						eo_XX.ISO8859-3
> eo_XX:						eo_XX.ISO8859-3

If this is what locale.alias says, doesn't it mean that the system
wants us to use Latin-3 by default for this locale?  IOW, why does
nl_langinfo return a value that is different from what this file says?
Is that because locale.alias comes from X11, not from glibc?

In any case, unless we change the code in mule-cmds.el, as long as
locale.alias says the above, what we say in language-info-alist about
this locale doesn't matter.  At least that's my reading of the code in
mule-cmds.el.