all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jürgen Hartmann" <juergen_hartmann_@hotmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: Automatic recognition of some specific coding systems
Date: Wed, 25 Feb 2015 18:53:39 +0100	[thread overview]
Message-ID: <DUB124-W2064AFAE1638C7C2D99579A8170@phx.gbl> (raw)
In-Reply-To: <83twya55h9.fsf@gnu.org>

Thank you, Eli Zaretskii, for repetitively digging into this problem:

>> encoded and its contents is displayed as
>> 
>>    \204\224\201\341\216\231\232
>  
> That's true, but I see the same behavior in Emacs 22.3, if I invoke it
> with "emacs -q" (lowercase 'q', since 22.x didn't support -Q), so
> there's no change in behavior here.

That is right: I had to do some minor configuration to get Emacs 22.3
to correctly recognize these three coding systems. See below.

> How exactly did you verify with v22.3?  As I wrote above, I see the
> same behavior in that version.  Did you invoke it with -q?  If not,
> there are some customization of yours that modify the default
> behavior, and the question becomes how to express the same
> customizations in Emacs 24.

To set up a clean stage, I just recompiled Emacs 22.3 from the vanilla
Gnu sources, and started one session with -q and another with -Q,
receiving the same result in both cases.

For the tests I used the same sample text files

   utf-8-unix
   latin-9-unix
   cp850-dos

that I described in my previous post.

As you already described, without any customization the automatic
recognition fails in the case of the cp850-dos encoded text file, as
its coding is recognized as raw-text-dos. So far we get the same
result as in the Emacs 24.4 case.

But if one issues the commands

   (check-coding-system 'cp850)
   (setq coding-category-ccl 'cp850)
   (update-coding-systems-internal)

in the *scratch* buffer (Lisp Interaction mode) of Emacs 22.3 right
after starting the session, all three coding systems will be perfectly
recognized when the text files are visited.

After this customization, the contents of the variable
coding-category-list has the form

   (coding-category-utf-8 coding-category-iso-8-1 coding-category-ccl ...)

where the values of the variables coding-category-utf-8,
coding-category-iso-8-1, and coding-category-ccl are mule-utf-8,
iso-latin-1, and cp850 respectively.

You are perfectly right stating that the question to be addressed now
is how to port these customization commands to the contemporary
version 24.4 of Emacs: In that version the coding system cp850 is not
any more implemented via CCL and it is associated with the coding
category coding-category-charset--the same category that the systems
latin-1 and latin-9 are associated with. Furthermore, the command
update-coding-systems-internal is not available any more, but this
might be a minor detail.

I am rather clueless here, so any help is most welcome.

Juergen

 		 	   		  

  reply	other threads:[~2015-02-25 17:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 15:31 Automatic recognition of some specific coding systems Jürgen Hartmann
2015-02-24 18:28 ` Eli Zaretskii
2015-02-24 22:30   ` Jürgen Hartmann
2015-02-25 16:19     ` Eli Zaretskii
2015-02-25 17:53       ` Jürgen Hartmann [this message]
2015-02-25 20:29         ` Eli Zaretskii
2015-02-25 23:23           ` Jürgen Hartmann
2015-02-26 16:36             ` Eli Zaretskii
2015-02-26 22:34               ` Jürgen Hartmann
2015-02-28 16:55                 ` Eli Zaretskii
2015-03-03 22:58                   ` Jürgen Hartmann
2015-02-27  1:50 ` Yuri Khan
2015-02-27 12:12   ` Jürgen Hartmann
2015-02-27 12:25     ` Jürgen Hartmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DUB124-W2064AFAE1638C7C2D99579A8170@phx.gbl \
    --to=juergen_hartmann_@hotmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.