GNU bug report logs - #57531
28.1; Character encoding missing for "eo"

Previous Next

Package: emacs;

Reported by: Jonathan Reeve <jonathan <at> jonreeve.com>

Date: Thu, 1 Sep 2022 19:34:02 UTC

Severity: normal

Tags: moreinfo

Found in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #192 received at 57531 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jonathan <at> jonreeve.com, larsi <at> gnus.org, schwab <at> linux-m68k.org,
 57531 <at> debbugs.gnu.org
Subject: Re: bug#57531: 28.1; Character encoding missing for "eo"
Date: Thu, 06 Oct 2022 15:15:51 +0000
>> To avoid such bugs, the most reasonable thing to do for users is to 
>> always specify the encoding.
>
> Should we perhaps have an entry in PROBLEMS with that information?
>

Would it not be better if Emacs checked the LANG environment variable on 
startup and warned the user when LANG does not specify an encoding?  Like 
this:

diff --git a/lisp/startup.el b/lisp/startup.el
index 50a8f491d8..338fb47f64 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -824,6 +824,14 @@ normal-top-level
        (unless inhibit-startup-hooks
          (run-hooks 'window-setup-hook))))

+    (when (< (length (split-string (getenv "LANG") "\\.")) 2)
+      (display-warning 'initialization
+                       (format "%s%s%s"
+                               "The LANG environment variable, set to `"
+                               (getenv "LANG")
+                               "', does not specify an encoding.")
+                       :warning))
+
     ;; Subprocesses of Emacs do not have direct access to the terminal, so
     ;; unless told otherwise they should only assume a dumb terminal.
     ;; We are careful to do it late (after term-setup-hook), although the




This bug report was last modified 2 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.