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 Mueller
Subject: Re: Disambiguate modeline character for UTF-8?
Date: Wed, 05 Jul 2023 15:04:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

>>>>> On Wed, 05 Jul 2023, Eli Zaretskii wrote:

>> Coming back to this thread (which at the time ended in bikeshedding).
>> The goal I had in mind was to disambiguate UTF-8, i.e. a unique modeline
>> character would be used for it. Currently this is not the case:
>> 
>>    U -- utf-8*  (all variants)
>>    U -- utf-16* (all variants)
>>    U -- utf-7
>>    U -- koi8-u
>> 
>> So, I propose to change this to either:
>> 
>>    + -- utf-8*  (all variants)
>>    (everything else unchanged)
>> 
>> or:
>> 
>>    U -- utf-8*  (all variants)
>>    u -- utf-16* (all variants)
>>    u -- utf-7
>>    K -- koi8-u

> TBH, I don't like to change such long-time features.

> The only real problem is between UTF-8 and UTF-16, since the others
> are hardly ever used these days.  UTF-16 is also quite rarely used,
> basically only on MS-Windows for system-level files.  So is this
> really a problem that we need to solve, at the risk of breaking
> people's "muscle" memory?  If I see the lower-case "u" on the
> modeline when I expect to see "U" instead, I'd be surprised.  Is it
> worth it?

UTF-8 is one of the most common encodings, and it is strange that it
shares its modeline indicator with anything else. And the "U" is really
ambiguous, because context won't help (or how would you decide if a
buffer's file encoding is e.g. koi8-u or utf-8?).

As you say, the others in the above list are rarely used nowadays. So,
maybe users should see the "u" or the "K" to indicate that the file has
an unusual encoding?



reply via email to

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