bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11694: 24.1; in-is13194-devanagari with \200


From: Per Starbäck
Subject: bug#11694: 24.1; in-is13194-devanagari with \200
Date: Wed, 13 Jun 2012 16:28:20 +0200

In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

$ echo -e 'Sm\xf6rg\xe5sbord' >test1.txt

When opened by Emacs that file is detected correctly as being
Latin-1.

$ echo -e 'Sm\xf6rg\xe5sbord \x805' >test2.txt

Here I add a price of 5 Euro for the Smorgasbord, written with
Microsoft's windows-1252 (which is very similar to latin-1).

With Emacs 23 this test2.txt is opened as raw-text-unix which is OK
I guess. (Detecting windows-1252 correctly isn't that easy.)

But now, with Emacs 24, it is opened as in-is13194-devanagari-unix which
surprises me. I think this is a bug. The problem is that \xe5 is shown
as "\200" then anyway. Why guess a coding which doesn't make sense of
all the characters? And if we really want to guess something even if it
doesn't make sense of that character, why prefer this to Latin-1 which
makes sense of the same part of the input and which was preferrable if
the "strange" part didn't exist?

I don't know where this change comes from. "C-h C" shows the same
"Priority order for recognizing coding systems when reading files" as I
had in 23.4, starting

  Priority order for recognizing coding systems when reading files:
    1. utf-8 (alias: mule-utf-8)
    2. iso-2022-7bit 
    3. iso-latin-1 (alias: iso-8859-1 latin-1)
    4. iso-2022-7bit-lock (alias: iso-2022-int-1)
    5. iso-2022-8bit-ss2 
    6. emacs-mule 
    7. raw-text 
    8. iso-2022-jp (alias: junet)
    9. in-is13194-devanagari (alias: devanagari)

windows-1252 isn't there at all, so of course I can't detect that.
(Maybe it ought to be there somewhere, but that's another issue in that
case.)

After
(set-coding-system-priority 'windows-1252)
(set-coding-system-priority 'in-is13194-devanagari)

so that windows-1252 is recognized, but in-is13194-devanagari is
preferred, test2.txt still detects as in-is13194-devanagari, even though
there now is is a possiblity that makes sense of all characters.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]