unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11694: 24.1; in-is13194-devanagari with \200
@ 2012-06-13 14:28 Per Starbäck
  2016-07-08 23:11 ` npostavs
  0 siblings, 1 reply; 2+ messages in thread
From: Per Starbäck @ 2012-06-13 14:28 UTC (permalink / raw)
  To: 11694

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#11694: 24.1; in-is13194-devanagari with \200
  2012-06-13 14:28 bug#11694: 24.1; in-is13194-devanagari with \200 Per Starbäck
@ 2016-07-08 23:11 ` npostavs
  0 siblings, 0 replies; 2+ messages in thread
From: npostavs @ 2016-07-08 23:11 UTC (permalink / raw)
  To: Per Starbäck; +Cc: 11694

found 11694 24.2
tags 11694 fixed
close 11694 24.3
quit


starback@stp.lingfil.uu.se (Per Starbäck) writes:

> In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.18.9)
> $ 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.)

With Emacs 24.3 it's detected as raw-text-unix again.

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

And it's correctly recognized as windows-1252 after doing this.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-08 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 14:28 bug#11694: 24.1; in-is13194-devanagari with \200 Per Starbäck
2016-07-08 23:11 ` npostavs

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).