From: starback@stp.lingfil.uu.se (Per Starbäck)
To: 11694@debbugs.gnu.org
Subject: bug#11694: 24.1; in-is13194-devanagari with \200
Date: Wed, 13 Jun 2012 16:28:20 +0200 [thread overview]
Message-ID: <qzhaufjngb.fsf@numerus.lingfil.uu.se> (raw)
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.
next reply other threads:[~2012-06-13 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 14:28 Per Starbäck [this message]
2016-07-08 23:11 ` bug#11694: 24.1; in-is13194-devanagari with \200 npostavs
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=qzhaufjngb.fsf@numerus.lingfil.uu.se \
--to=starback@stp.lingfil.uu.se \
--cc=11694@debbugs.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.