[Top][All Lists]

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

Re: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF

From: Paul Eggert
Subject: Re: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF-8 encoded Lisp files
Date: Sat, 26 Sep 2015 09:01:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Eli Zaretskii wrote:
So you are, in effect, saying that it is incorrect to derive the
default encodings from the locale's codeset?

Yes, for Emacs developers. And come to think of it, for most Emacs users. Nowadays in my experience most non-ASCII text files use UTF-8, regardless of locale. The old days of having to guess encoding from the locale are passing away. This is partly due to UTF-8 being the encoding of choice for HTML and XML, where UTF-8 overtook the older 8-bit encodings in 2008 and now is by far the dominant encoding.

One way to accommodate the new reality would be to change Emacs so that by default the system locale does not affect Emacs's guess of a file's encoding if the file's initial sample is valid UTF-8. Users could set a variable to re-enable the old behavior. If we did this, we wouldn't have the error-prone process if sprinkling 'coding: utf-8' cookies all over the place.

reply via email to

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