emacs-devel
[Top][All Lists]
Advanced

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

Re: per-buffer language environments


From: Stephen J. Turnbull
Subject: Re: per-buffer language environments
Date: Tue, 14 Dec 2010 20:38:43 +0900

Eli Zaretskii writes:

 > > * Which coding systems have higher priority when inserting a
 > >   file in the current buffer.
 > 
 > I could understand how the font selection and the default input method
 > are related to the language, but what do encodings have to do with
 > that?  The preferred encoding is generally an attribute of a locale,
 > not of a language.

Note the word "insert", which implies "read".  It is certainly true
that a locale may specify an encoding.  However, if the person is
Japanese, they may specify ja_JP.UTF-8 for their locale and strongly
prefer that files be written with that encoding, yet still need to
read files in other encodings.  The locale encoding of UTF-8 is no
help in distinguishing an EUC-JP file from an ISO-8859-1 file, let
alone an EUC-CN file.  OTOH, somebody with a Hebrew language
environment and a locale specifying UTF-8 as the encoding almost
certainly prefers that a file containing 8-bit-set octets inconsistent
with UTF-8 be recognized as ISO-8859-8 rather than EUC-JP, no?

 > The fact that we mix them is because Emacs had
 > language environments before it had locale environments.

What's a "locale environment"?  AFAIK Emacsen use the locale as a
heuristic for determining the language environment unless otherwise
specified, but it seems like you mean something else.




reply via email to

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