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

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

bug#22436: read-coding-system uses wrong default when called from write-


From: Eli Zaretskii
Subject: bug#22436: read-coding-system uses wrong default when called from write-file
Date: Sat, 23 Jan 2016 15:09:39 +0200

> From: Richard Copley <rcopley@gmail.com>
> Date: Sat, 23 Jan 2016 11:53:13 +0000
> Cc: 22436@debbugs.gnu.org
> 
> Thanks for explaining that. I imagined Emacs would use a
> heuristic based on the contents of the file.

There is indeed a heuristic, but it's not very smart, and only works
well when the encoding is blatantly clear.  This is an area where
improvements are welcome.  In any case, when presented with a buffer
that includes a single non-ASCII character that can be encoded by a
dozen of possible encodings, it's hard to be too smart based on the
contents alone.

> If there were a fallback ordering that preferred utf-8 or some
> other universally applicable coding system it would be easier
> for most users and less confusing for beginners.

Such a fallback does exist, see coding-system-priority-list.  What
"M-x prefer-coding-system RET" does is manipulate the priorities so
that the encoding you typed is preferred.

Do we close this report, or is there something else to do about it?

Thanks.





reply via email to

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