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: Thu, 22 Nov 2018 05:39:13 +0200 Message-ID: <83lg5lhjby.fsf@gnu.org> References: <87zhu24h0b.fsf@gmx.net> <87r2fe4bru.fsf@gmx.net> <83o9aigj29.fsf@gnu.org> <87in0q3va0.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1542858035 23257 195.159.176.226 (22 Nov 2018 03:40:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2018 03:40:35 +0000 (UTC) Cc: schwab@suse.de, emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 22 04:40:31 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 1gPfqv-0005uC-NK for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2018 04:40:29 +0100 Original-Received: from localhost ([::1]:43855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPft2-0006kr-7P for ged-emacs-devel@m.gmane.org; Wed, 21 Nov 2018 22:42:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPfsF-0006jv-PZ for emacs-devel@gnu.org; Wed, 21 Nov 2018 22:41:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPfpc-00071k-0C for emacs-devel@gnu.org; Wed, 21 Nov 2018 22:39:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPfpZ-0006ty-2P; Wed, 21 Nov 2018 22:39:06 -0500 Original-Received: from [176.228.60.248] (port=4641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gPfpV-0007WW-FJ; Wed, 21 Nov 2018 22:39:02 -0500 In-reply-to: <87in0q3va0.fsf@gmx.net> (message from Stephen Berman on Wed, 21 Nov 2018 23:44:55 +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:231302 Archived-At: > From: Stephen Berman > Cc: schwab@suse.de, emacs-devel@gnu.org > 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.