emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disambiguate modeline character for UTF-8?


From: Ulrich Müller
Subject: Re: Disambiguate modeline character for UTF-8?
Date: Thu, 06 Jul 2023 20:44:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

>>>>> On Thu, 06 Jul 2023, Paul Eggert wrote:

> On 2023-07-06 06:08, Ulrich Mueller wrote:
>> for both UTF-7 and koi8-u the coded character set is not
>> Unicode but only a subset of it

> It would be helpful to use 'u' when only a subset of Unicode can be
> represented, as a clue that something odd is going on, compared to the
> more-usual 'U'.

How about the following patch then?


>From b33df88e456092e89bad52565b68a77ea3d0c71a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Thu, 6 Jul 2023 20:36:09 +0200
Subject: [PATCH] Disambiguate mode line indication for utf-8 and utf-16

* lisp/international/mule-conf.el (utf-7):
* lisp/language/cyrillic.el (koi8-u): Change mnemonic letters to
?u and ?K, respectively.
---
 lisp/international/mule-conf.el | 2 +-
 lisp/language/cyrillic.el       | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index a27aaf9e522..f65f124b633 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1600,7 +1600,7 @@ 'ascii
 (define-coding-system 'utf-7
   "UTF-7 encoding of Unicode (RFC 2152)."
   :coding-type 'utf-8
-  :mnemonic ?U
+  :mnemonic ?u
   :mime-charset 'utf-7
   :charset-list '(unicode)
   :pre-write-conversion 'utf-7-pre-write-conversion
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 7af87e65703..1ad1302095b 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -126,7 +126,10 @@ 'cp878
 (define-coding-system 'koi8-u
   "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
   :coding-type 'charset
-  :mnemonic ?U
+  ;; This used to be ?U which collided with UTF-8.  ?K is also used
+  ;; for Korean, but it shouldn't be a real conflict since Cyrillic
+  ;; and Hangul can be disambiguated from context.
+  :mnemonic ?K
   :charset-list '(koi8-u)
   :mime-charset 'koi8-u)
 
-- 
2.41.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]