[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changed coding system priority (sort-coding-systems)
From: |
Reiner Steib |
Subject: |
Changed coding system priority (sort-coding-systems) |
Date: |
Thu, 13 Mar 2008 11:44:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
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: <address@hidden>
| Content-Type: text/plain; charset=windows-1252
`----
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changed coding system priority (sort-coding-systems),
Reiner Steib <=