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: Wed, 25 Feb 2015 18:53:39 +0100 Message-ID: References: , <83fv9v6u5o.fsf@gnu.org>, , <83twya55h9.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 1424886845 10269 80.91.229.3 (25 Feb 2015 17:54:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 17:54:05 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 18:53:58 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 1YQg9m-0006fd-4u for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 18:53:58 +0100 Original-Received: from localhost ([::1]:55635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQg9l-0001Cm-Fb for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2015 12:53:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQg9Z-0001Bl-84 for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 12:53:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQg9V-0005Gf-2J for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 12:53:45 -0500 Original-Received: from dub004-omc4s16.hotmail.com ([157.55.2.91]:54900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQg9U-0005Fi-Q6 for help-gnu-emacs@gnu.org; Wed, 25 Feb 2015 12:53:40 -0500 Original-Received: from DUB124-W20 ([157.55.2.71]) by DUB004-OMC4S16.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Wed, 25 Feb 2015 09:53:40 -0800 X-TMN: [/sNUc5Z34P0COf8ay+yTrz3e02aNbDQk] X-Originating-Email: [juergen_hartmann_@hotmail.com] Importance: Normal In-Reply-To: <83twya55h9.fsf@gnu.org> X-OriginalArrivalTime: 25 Feb 2015 17:53:40.0237 (UTC) FILETIME=[FCE5D3D0:01D05123] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 157.55.2.91 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:102890 Archived-At: Thank you=2C Eli Zaretskii=2C for repetitively digging into this problem:= =0A= =0A= >> encoded and its contents is displayed as=0A= >> =0A= >> \204\224\201\341\216\231\232=0A= > =0A= > That's true=2C but I see the same behavior in Emacs 22.3=2C if I invoke i= t=0A= > with "emacs -q" (lowercase 'q'=2C since 22.x didn't support -Q)=2C so=0A= > there's no change in behavior here.=0A= =0A= That is right: I had to do some minor configuration to get Emacs 22.3=0A= to correctly recognize these three coding systems. See below.=0A= =0A= > How exactly did you verify with v22.3? As I wrote above=2C I see the=0A= > same behavior in that version. Did you invoke it with -q? If not=2C=0A= > there are some customization of yours that modify the default=0A= > behavior=2C and the question becomes how to express the same=0A= > customizations in Emacs 24.=0A= =0A= To set up a clean stage=2C I just recompiled Emacs 22.3 from the vanilla=0A= Gnu sources=2C and started one session with -q and another with -Q=2C=0A= receiving the same result in both cases.=0A= =0A= For the tests I used the same sample text files=0A= =0A= utf-8-unix=0A= latin-9-unix=0A= cp850-dos=0A= =0A= that I described in my previous post.=0A= =0A= As you already described=2C without any customization the automatic=0A= recognition fails in the case of the cp850-dos encoded text file=2C as=0A= its coding is recognized as raw-text-dos. So far we get the same=0A= result as in the Emacs 24.4 case.=0A= =0A= But if one issues the commands=0A= =0A= (check-coding-system 'cp850)=0A= (setq coding-category-ccl 'cp850)=0A= (update-coding-systems-internal)=0A= =0A= in the *scratch* buffer (Lisp Interaction mode) of Emacs 22.3 right=0A= after starting the session=2C all three coding systems will be perfectly=0A= recognized when the text files are visited.=0A= =0A= After this customization=2C the contents of the variable=0A= coding-category-list has the form=0A= =0A= (coding-category-utf-8 coding-category-iso-8-1 coding-category-ccl ...)= =0A= =0A= where the values of the variables coding-category-utf-8=2C=0A= coding-category-iso-8-1=2C and coding-category-ccl are mule-utf-8=2C=0A= iso-latin-1=2C and cp850 respectively.=0A= =0A= You are perfectly right stating that the question to be addressed now=0A= is how to port these customization commands to the contemporary=0A= version 24.4 of Emacs: In that version the coding system cp850 is not=0A= any more implemented via CCL and it is associated with the coding=0A= category coding-category-charset--the same category that the systems=0A= latin-1 and latin-9 are associated with. Furthermore=2C the command=0A= update-coding-systems-internal is not available any more=2C but this=0A= might be a minor detail.=0A= =0A= I am rather clueless here=2C so any help is most welcome.=0A= =0A= Juergen=0A= =0A= =