GNU bug report logs -
#22436
read-coding-system uses wrong default when called from write-file
Previous Next
Full log
View this message in rfc822 format
> From: Richard Copley <rcopley <at> gmail.com>
> Date: Sat, 23 Jan 2016 11:53:13 +0000
> Cc: 22436 <at> 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.
This bug report was last modified 9 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.