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

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

bug#10383: 24.0.91; (prefer-coding-system 'utf-8-with-signature) breaks


From: Kenichi Handa
Subject: bug#10383: 24.0.91; (prefer-coding-system 'utf-8-with-signature) breaks the world
Date: Wed, 28 Dec 2011 17:07:43 +0900

In article 
<CAHZoxq8wxViADRk+rgq5eWEwNcB8FV-F5sxbZLjqjfMtDwgVOg@mail.gmail.com>, Eric 
Hanchrow <eric.hanchrow@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@m17n.org





reply via email to

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