From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?B?SvxyZ2VuIEhhcnRtYW5u?= Newsgroups: gmane.emacs.help Subject: RE: Automatic recognition of some specific coding systems Date: Thu, 26 Feb 2015 00:23:50 +0100 Message-ID: References: , <83fv9v6u5o.fsf@gnu.org>, , <83twya55h9.fsf@gnu.org>, , <83mw4168ha.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1424906658 7558 80.91.229.3 (25 Feb 2015 23:24:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 23:24:18 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 00:24:10 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YQlJI-0002xG-FY for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 00:24:08 +0100 Original-Received: from localhost ([::1]:56728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlJH-0007jX-VL for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 18:24:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlJ5-0007hG-8E for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 18:23:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQlJ2-0007CC-2K for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 18:23:55 -0500 Original-Received: from dub004-omc4s12.hotmail.com ([157.55.2.87]:65048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlJ1-0007C8-Ss for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 18:23:51 -0500 Original-Received: from DUB124-W18 ([157.55.2.72]) by DUB004-OMC4S12.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Wed, 25 Feb 2015 15:23:50 -0800 X-TMN: [LPXIhEeb6pKGFBlKtxHtVFRoj9EXPMGY] X-Originating-Email: [juergen_hartmann_@hotmail.com] Importance: Normal In-Reply-To: <83mw4168ha.fsf@gnu.org> X-OriginalArrivalTime: 25 Feb 2015 23:23:50.0741 (UTC) FILETIME=[1CE0D850:01D05152] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 157.55.2.87 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102898 Archived-At: @Eli Zaretskii: Thank you very much for your hint:=0A= =0A= > Try this:=0A= > =0A= >=A0=A0 (set-coding-system-priority 'utf-8 'cp850)=0A= =A0=0A= After doing this=2C the coding systems=0A= =0A= =A0=A0 utf-8=0A= =A0=A0 cp850=0A= =0A= get correctly recognized=2C but=0A= =0A= =A0=A0 latin-9-unix=0A= =0A= gets wrongly recognized as cp850-unix encoded.=0A= =0A= If I modify the lisp expression to=0A= =0A= =A0=A0 (set-coding-system-priority 'utf-8 'latin-9)=0A= =0A= it is utf-8 and latin-9 that are properly recognized while the test=0A= file=0A= =0A= =A0=A0 cp850-dos=0A= =0A= gets detected as iso-latin-9-dos encoded.=0A= =0A= If I pass all three coding systems to set-coding-system-priority=2C=0A= =0A= =A0=A0 (set-coding-system-priority 'utf-8 'latin-9 'cp850)=A0=A0 or=0A= =A0=A0 (set-coding-system-priority 'utf-8 'cp850 'latin-9)=0A= =0A= it turns out that the function set-coding-system-priority ignores the third= =0A= coding system in these cases=2C because it belongs to the same coding=0A= category as the coding system named in the second place. The source=0A= code src/coding.c comments this in the lines 9972 and 9973 like this:=0A= =0A= =A0=A0=A0 /* Ignore this coding system because a coding system of the=0A= =A0=A0=A0 =A0=A0 same category already had a higher priority.=A0 */=0A= =0A= So I fear that we can not use this function to establish the=0A= simultaneous recognizability of all tree coding systems.=0A= =0A= By the way=2C could you verify=2C that this is possible with Emacs 22.3=0A= with the customization described in my previous post?=0A= =0A= Juergen=0A= =0A= =