From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66480 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Changed coding system priority (sort-coding-systems) Date: Thu, 13 Mar 2008 11:44:06 +0100 Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205405096 10112 80.91.229.12 (13 Mar 2008 10:44:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2008 10:44:56 +0000 (UTC) Cc: ding@gnus.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 13 11:45:23 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JZkw3-0004nX-0Q for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 11:45:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZkvT-0007zx-Tz for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 06:44:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZkvN-0007zM-VH for emacs-devel@gnu.org; Thu, 13 Mar 2008 06:44:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZkvL-0007z0-Nr for emacs-devel@gnu.org; Thu, 13 Mar 2008 06:44:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZkvL-0007yx-GE for emacs-devel@gnu.org; Thu, 13 Mar 2008 06:44:35 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZkvK-0006rl-V4 for emacs-devel@gnu.org; Thu, 13 Mar 2008 06:44:35 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m2DAiV2p020183; Thu, 13 Mar 2008 11:44:32 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id C96D612FC1; Thu, 13 Mar 2008 11:44:31 +0100 (CET) X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92393 gmane.emacs.gnus.general:66480 Archived-At: 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: ,----[ 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 | v language-info-alist RET ] | ("Latin-1" | [...] | (coding-priority iso-latin-1) | (coding-system iso-latin-1 iso-latin-9 windows-1252) `---- ,----[ Emacs 22 | 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/