[Top][All Lists]

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

Re: What is a preferred charset?

From: Eli Zaretskii
Subject: Re: What is a preferred charset?
Date: Wed, 21 Nov 2018 17:37:07 +0200

> From: Stephen Berman <address@hidden>
> Date: Wed, 21 Nov 2018 15:55:32 +0100
> The discussion in bug#33445 made me realize that I don't know what
> distinguishes a preferred charset from other charsets and why this term
> is used in `describe-char' (and no where else in Emacs that I could
> find, aside from a comment in lisp/org/ox-ascii.el).

"Preferred" is used there in the sense of "highest priority".  See
charset-priority-list, set-charset-priority, and char-charset.  They
are described in the node "Character Sets" of the ELisp manual.

I guess someone tried to say "highest-priority" in fewer characters,
to avoid making the line too long.

> For example, etc/HELLO uses the non-standard text/enriched
> annotation "x-charset" to make `describe-char' show
> "latin-iso8859-1" as the preferred charset of INVERTED EXCLAMATION
> MARK (#xa1), whereas when I use `C-x 8' to enter that character in a
> buffer `describe-char' says its preferred charset is "unicode".  Why
> are there different preferred charsets in these cases and what's the
> significance and use of that difference in general

When text has the 'charset' property, we show its value as the
highest-priority charset of the characters having that property.  This
property is described in "Explicit Encoding".

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.

> and should it be documented?

Now that you know what this is about, you tell me ;-)

reply via email to

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