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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Oct 2022 15:39:18 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Tue, 04 Oct 2022 13:44:10 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Something like the below could be acceptable, if it solves the
> > problem.
> >
> > diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
> > index 4137642..6866291 100644
> > --- a/lisp/international/mule-cmds.el
> > +++ b/lisp/international/mule-cmds.el
> > @@ -2317,7 +2317,7 @@ locale-language-names
> >      ;; en_IN -- fx.
> >      ("en_IN" "English" utf-8) ; glibc uses utf-8 for English in India
> >      ("en" "English" iso-8859-1) ; English
> > -    ("eo" . "Esperanto") ; Esperanto
> > +    ("eo" "Esperanto" locale-info) ; Esperanto
> 
> (etc).  This does not seem to fix the problem.

It won't solve the problem if you have that X11 file on your system,
because we read it before we get to the code I changed.

> This does work (with or without the patch):
> 
> LANG=eo.UTF-8 ./src/emacs -Q
> current-locale-environment
> "eo.UTF-8"

But it requires the eo.UTF-8 locale to be available, AFAIU, and for
that reason somehow didn't work for the OP.  I don't think I
understood why it didn't work for him.  I still hope the OP will come
back and help us understand that.

> 1) The "eo" environment should be in utf-8 -- all the indications seem
> to point to that, except some outdated Debian files that nobody else
> uses but Emacs.
> 
> 2) Using eo.UTF-8 is a work-around that works fine.
> 
> 3) Changing what Emacs does here might be disruptive to people that are
> used to Emacs defaulting to Latin-3 for the "eo" locale.
> 
> So the question is whether Emacs should start doing the right thing as
> 1), or worry more about 3).
> 
> I'm leaning more towards 1), but I don't have a strong opinion.

If we think 2) will work for (almost) everyone, maybe the problem is
not serious enough to have to decide between two extremes?