From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What is a preferred charset? Date: Wed, 21 Nov 2018 17:37:07 +0200 Message-ID: <83sgzuh270.fsf@gnu.org> References: <87zhu24h0b.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542814609 15628 195.159.176.226 (21 Nov 2018 15:36:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2018 15:36:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 21 16:36:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPUYW-0003xT-Qb for ged-emacs-devel@m.gmane.org; Wed, 21 Nov 2018 16:36:44 +0100 Original-Received: from localhost ([::1]:39841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPUad-0008Es-6N for ged-emacs-devel@m.gmane.org; Wed, 21 Nov 2018 10:38:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPUYq-0007v7-Jl for emacs-devel@gnu.org; Wed, 21 Nov 2018 10:37:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPUYk-00078s-MA for emacs-devel@gnu.org; Wed, 21 Nov 2018 10:37:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPUYj-000780-5x; Wed, 21 Nov 2018 10:36:57 -0500 Original-Received: from [176.228.60.248] (port=3970 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gPUYi-0006HB-PP; Wed, 21 Nov 2018 10:36:57 -0500 In-reply-to: <87zhu24h0b.fsf@gmx.net> (message from Stephen Berman on Wed, 21 Nov 2018 15:55:32 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231291 Archived-At: > From: Stephen Berman > 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 ;-)