GNU bug report logs - #10383
24.0.91; (prefer-coding-system 'utf-8-with-signature) breaks the world

Previous Next

Package: emacs;

Reported by: Eric Hanchrow <eric.hanchrow <at> gmail.com>

Date: Tue, 27 Dec 2011 22:28:02 UTC

Severity: normal

Found in version 24.0.91

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Hanchrow <eric.hanchrow <at> gmail.com>
To: Kenichi Handa <handa <at> m17n.org>
Cc: 10383 <at> debbugs.gnu.org
Subject: bug#10383: 24.0.91; (prefer-coding-system 'utf-8-with-signature) breaks the world
Date: Thu, 29 Dec 2011 15:27:44 -0800
Thanks, that indeed fixes it.

On Wed, Dec 28, 2011 at 12:07 AM, Kenichi Handa <handa <at> m17n.org> wrote:
> In article <CAHZoxq8wxViADRk+rgq5eWEwNcB8FV-F5sxbZLjqjfMtDwgVOg <at> mail.gmail.com>, Eric Hanchrow <eric.hanchrow <at> gmail.com> writes:
>
>> Type the following in *scratch*, then C-x C-e:
>>      (prefer-coding-system 'utf-8-with-signature)
>> Now type C-x d.
>> You'll see an error:
>>         Cannot open load file: dired
>> You will soon find that your emacs is entirely broken, since no files
>> can be loaded.
>
> This is because utf-8-with-signature is recognized as ASCII
> compatible and thus default-file-coding-system is also set
> to it.  I've just committed a fix to make
> utf-8-with-signature not ASCII compatible.  Please try
> again with the latest trunk code.
>
> By the way, as a result, now
>
>    (prefer-coding-system 'utf-8-with-signature)
>
> does not change default-file-coding-system.  I'm not sure
> what is the intention of preferring utf-8-with-signature,
> one may want default-file-coding-system be set to utf-8 in
> such a case.  But, doing that automatically is too
> heuristic.  Another possibility is that what actually wanted
> is such a coding as utf-8-with-signature-on-decoding-only
> (i.e. on decoding, BOM is recognized, but on encoding, don't
> produce BOM).
>
> ---
> Kenichi Handa
> handa <at> m17n.org




This bug report was last modified 13 years and 198 days ago.

Previous Next


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