GNU bug report logs - #2354
23.0.90; Emacs fails to detect utf-8 encoding with language environment Latin-1

Previous Next

Package: emacs;

Reported by: David Engster <deng <at> randomsample.de>

Date: Tue, 17 Feb 2009 10:45:02 UTC

Severity: normal

Merged with 2497

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 2354 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Engster <deng <at> randomsample.de>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 2354 <at> debbugs.gnu.org
Subject: Re: bug#2354: 23.0.90; Emacs fails to detect utf-8 encoding with  language environment Latin-1
Date: Tue, 17 Feb 2009 19:04:42 +0100
Juanma Barranquero <lekktu <at> gmail.com> writes:
> On Tue, Feb 17, 2009 at 11:35, David Engster <deng <at> randomsample.de> wrote:
>
>> You can reproduce it as follows:
>>
>> 1. emacs -Q
>> 2. M-x set-language-environment RET Latin-1 RET
>> 3. In some buffer write:
>>
>>  (ucs-insert "2500")
>>
>> 4. Eval it, so that the unicode character is inserted into the buffer.
>> 5. Save the file and choose utf-8 as encoding.
>> 6. Kill the buffer.
>> 7. Load the file you just saved.
>>
>> Result: Emacs displays "รข\224\200" for the unicode character.
>
> I cannot reproduce it on Windows with the current trunk. The file's
> coding is correctly detected as UTF-8.

Thank you for looking into this. I tested this now again on a different
machine, but also running GNU/Linux (Ubuntu 8.10), with the same
result. FWIW, I think I could track down this issue to the following
commit for src/coding.c:

revision 1.413
date: 2009-02-09 01:42:37 +0100;  author: handa;  state: Exp;  lines: +1 -1;  commitid: WAhpeD8cqX926HBt;
(detect_coding_charset): Fix previous change.

With revision 1.412 of coding.c, the error disappears for me.

-David




This bug report was last modified 16 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.