[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Automatic recognition of some specific coding systems
From: |
Jürgen Hartmann |
Subject: |
RE: Automatic recognition of some specific coding systems |
Date: |
Thu, 26 Feb 2015 00:23:50 +0100 |
@Eli Zaretskii: Thank you very much for your hint:
> Try this:
>
> (set-coding-system-priority 'utf-8 'cp850)
After doing this, the coding systems
utf-8
cp850
get correctly recognized, but
latin-9-unix
gets wrongly recognized as cp850-unix encoded.
If I modify the lisp expression to
(set-coding-system-priority 'utf-8 'latin-9)
it is utf-8 and latin-9 that are properly recognized while the test
file
cp850-dos
gets detected as iso-latin-9-dos encoded.
If I pass all three coding systems to set-coding-system-priority,
(set-coding-system-priority 'utf-8 'latin-9 'cp850) or
(set-coding-system-priority 'utf-8 'cp850 'latin-9)
it turns out that the function set-coding-system-priority ignores the third
coding system in these cases, because it belongs to the same coding
category as the coding system named in the second place. The source
code src/coding.c comments this in the lines 9972 and 9973 like this:
/* Ignore this coding system because a coding system of the
same category already had a higher priority. */
So I fear that we can not use this function to establish the
simultaneous recognizability of all tree coding systems.
By the way, could you verify, that this is possible with Emacs 22.3
with the customization described in my previous post?
Juergen
- Automatic recognition of some specific coding systems, Jürgen Hartmann, 2015/02/24
- Re: Automatic recognition of some specific coding systems, Eli Zaretskii, 2015/02/24
- RE: Automatic recognition of some specific coding systems, Jürgen Hartmann, 2015/02/24
- Re: Automatic recognition of some specific coding systems, Eli Zaretskii, 2015/02/25
- RE: Automatic recognition of some specific coding systems, Jürgen Hartmann, 2015/02/25
- Re: Automatic recognition of some specific coding systems, Eli Zaretskii, 2015/02/25
- RE: Automatic recognition of some specific coding systems,
Jürgen Hartmann <=
- Re: Automatic recognition of some specific coding systems, Eli Zaretskii, 2015/02/26
- RE: Automatic recognition of some specific coding systems, Jürgen Hartmann, 2015/02/26
- Re: Automatic recognition of some specific coding systems, Eli Zaretskii, 2015/02/28
Re: Automatic recognition of some specific coding systems, Yuri Khan, 2015/02/26