[Top][All Lists]

[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: Fri, 07 Jul 2023 07:48:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

>>>>> On Fri, 07 Jul 2023, Eli Zaretskii wrote:

>> The K (for all KOI8 variants) was actually suggested by a person from
>> Ukraine, back in 2020:
>> https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg01010.html

> That's one person...


>> > How about using У instead?  (Assuming using non-ASCII works there; the
>> > code seems to allow that.)
>> I've just tested a patch with current master, and for me the У works
>> both in an X frame ("У" in the mode line), in a text terminal under X
>> ("UUУ") and in the Linux console ("UUУ").
>> Can we assume that users have the necessary fonts installed?

> In Ukraine? most probably.

> Did that character on a GUI frame need a non-default font, or was it
> supported by the default font.  I'd expect the Cyrillic script to be
> supported by the fonts people use as the default in Emacs.

It's supported by the default font for me (which is Droid Sans Mono).
У aka U+0423 is contained in WGL4, and I guess that most fonts (also on
GNU/Linux) would cover a superset of it.

Updated patch below.

>From fbcc65ebde142f998e9dae8ad711f484585ef29b 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 ?\N{cyrillic capital letter u}, respectively.
 lisp/international/mule-conf.el | 2 +-
 lisp/language/cyrillic.el       | 3 ++-
 2 files changed, 3 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..f923c84e221 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -126,7 +126,8 @@ '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.
+  :mnemonic ?\N{cyrillic capital letter u} ; У
   :charset-list '(koi8-u)
   :mime-charset 'koi8-u)

reply via email to

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