emacs-devel
[Top][All Lists]
Advanced

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

Re: What is a preferred charset?


From: Stephen Berman
Subject: Re: What is a preferred charset?
Date: Thu, 22 Nov 2018 10:07:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Thu, 22 Nov 2018 05:39:13 +0200 Eli Zaretskii <address@hidden> wrote:

>> From: Stephen Berman <address@hidden>
>> Cc: address@hidden,  address@hidden
>> Date: Wed, 21 Nov 2018 23:44:55 +0100
>> 
>> >> > In the case of HELLO, each hello phrase was given the 'charset'
>> >> > property corresponding to its language's script, so as to instruct
>> >> > Emacs to choose the most appropriate font for that greeting.
>> >> 
>> >> ...this seems to be a different criterion for preferred, not the highest
>> >> priority as defined above
>> >
>> > Not a different criterion, it's just that the 'charset' text property
>> > overrides the charset priority order (as you'd expect).
>> 
>> But why override the priority order if the preferred charset by that
>> criterion (namely unicode, in this case) works (i.e. the character is
>> correctly displayed)?  I guess because there are cases where the
>> preferred charset according to priority order fails?
>
> It is not a question of success or failure: every charset which
> supports the character "succeeds".  We choose one of them in order to
> produce the effect (such as select a font for displaying it) that
> suits best what this particular user in this particular case expects.
> When text comes from an encoding that specifies its charset (such as
> Latin-N), we can determine that charset from the encoding; if not, we
> use the charset-priority order that is determined by the locale, as
> fallback.

So "preferred charset" means "charset the encoding specifies, if any,
otherwise the locale-specific highest priority charset"?  If so, it's
still not clear to me why HELLO specifies charsets that (at least in
some cases, like INVERTED EXCLAMATION MARK) differ from the highest
priority; is it because the specified charsets are known to correctly
display the characters regardless of locale (if that's even possible),
while it's not known whether the highest priority charset can correctly
display them?  In any case, it's ok with me to drop this now, since it's
become clear to me that "preferred charset" is not a technical term but
a term of convenience used only by describe-char, and it hasn't bothered
anyone till now (and I hadn't thought about it till now either).  Thanks
for the feedback.

Steve Berman



reply via email to

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