* Changed coding system priority (sort-coding-systems)
@ 2008-03-13 10:44 Reiner Steib
0 siblings, 0 replies; only message in thread
From: Reiner Steib @ 2008-03-13 10:44 UTC (permalink / raw)
To: emacs-devel; +Cc: ding
Hi,
in Emacs 23, with (set-language-environment "Latin-1"), windows-1252
(and iso-8859-15, too) gets a higher priority than utf-8. This wasn't
so in Emacs 22. Is this an intended change?
I was surprised to see charset=windows-1252 in this message[1] because
in Emacs 22, Gnus won't use windows-1252 in outgoing message unless
`mm-coding-system-priorities' prefers it.
IMHO, windows-1252 should be tried before falling back to binary on
decoding (e.g. when reading a file). On encoding (when saving to a
file or sending a mail message), utf-8 should be preferred. Rational:
Encourage to use UTF-8 instead of M$ windows-1252, but display common
windows-1252 file/message correctly.
Is there a way to achieve this? Or should we need to make a change in
Gnus (`mm-util.el')?
,----[ Emacs 22 ]
| ELISP> emacs-version
| "22.1.92.2"
| ELISP> (sort-coding-systems '(iso-8859-1 iso-8859-15 utf-8 windows-1252))
| (utf-8 iso-8859-1 iso-8859-15 windows-1252)
| ELISP> (set-language-environment "Latin-1")
| t
| ELISP> (sort-coding-systems '(iso-8859-1 iso-8859-15 utf-8 windows-1252))
| (iso-8859-1 utf-8 windows-1252 iso-8859-15)
`----
,----[ Emacs 23 ]
| ELISP> emacs-version
| "23.0.60.2"
| ELISP> (sort-coding-systems '(iso-8859-1 iso-8859-15 utf-8 windows-1252))
| (utf-8 iso-8859-1 iso-8859-15 windows-1252)
| ELISP> (set-language-environment "Latin-1")
| t
| ELISP> (sort-coding-systems '(iso-8859-1 iso-8859-15 utf-8 windows-1252))
| (iso-8859-1 iso-8859-15 windows-1252 utf-8)
`----
(Both tests with `LANG=en_US.UTF-8'.)
Hm, I guess this is the reason:
,----[ <f1> v language-info-alist RET ]
| coding-system value is a list of coding systems that are good
| for saving text written in this language environment.
| This list serves as suggestions to the user;
| in effect, as a kind of documentation.
| coding-priority value is a list of coding systems for this language
| environment, in order of decreasing priority.
| This is used to set up the coding system priority
| list when you switch to this language environment.
`----
,----[ Emacs 23 | <f1> v language-info-alist RET ]
| ("Latin-1"
| [...]
| (coding-priority iso-latin-1)
| (coding-system iso-latin-1 iso-latin-9 windows-1252)
`----
,----[ Emacs 22 | <f1> v language-info-alist RET ]
| ("Latin-1"
| [...]
| (coding-priority iso-latin-1 windows-1252)
| (coding-system iso-latin-1)
`----
Bye, Reiner.
[1]
,----
| From: Thien-Thi Nguyen [...]
| Subject: Re: Emacs Bazaar repository
| To: dhruva [...]
| Cc: emacs-devel[...]
| Date: Thu, 13 Mar 2008 10:04:54 +0100
| Message-ID: <874pbbyoy1.fsf@ambire.localdomain>
| Content-Type: text/plain; charset=windows-1252
`----
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-13 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-13 10:44 Changed coding system priority (sort-coding-systems) Reiner Steib
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.