From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#2497: 23.0.91; Fails to read UTF-8 on Win2k Date: Mon, 02 Mar 2009 21:25:58 +0200 Message-ID: References: <877i3c55tg.fsf@tum.de> <87ljrromgg.fsf@tum.de> Reply-To: Eli Zaretskii , 2497@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1236023041 16045 80.91.229.12 (2 Mar 2009 19:44:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2009 19:44:01 +0000 (UTC) Cc: 2497@emacsbugs.donarmstrong.com, uwe.siart@tum.de To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 20:45:17 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LeE4d-0005vN-2Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 20:45:12 +0100 Original-Received: from localhost ([127.0.0.1]:35045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeE3H-0004xd-U9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 14:43:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeE3E-0004wA-2y for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 14:43:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeE3C-0004uG-R0 for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 14:43:42 -0500 Original-Received: from [199.232.76.173] (port=40274 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeE3C-0004uD-Md for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 14:43:42 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41196) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeE3C-0008Nn-63 for bug-gnu-emacs@gnu.org; Mon, 02 Mar 2009 14:43:42 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n22JhcOi028966; Mon, 2 Mar 2009 11:43:39 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n22JZ3wZ026591; Mon, 2 Mar 2009 11:35:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 02 Mar 2009 19:35:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 2497 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 2497-submit@emacsbugs.donarmstrong.com id=B2497.123602197025271 (code B ref 2497); Mon, 02 Mar 2009 19:35:03 +0000 Original-Received: (at 2497) by emacsbugs.donarmstrong.com; 2 Mar 2009 19:26:10 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n22JQ6J7025265 for <2497@emacsbugs.donarmstrong.com>; Mon, 2 Mar 2009 11:26:08 -0800 Original-Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KFW0050084GPC00@i-mtaout6.012.net.il> for 2497@emacsbugs.donarmstrong.com; Mon, 02 Mar 2009 21:26:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.248.57]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KFW00JES8OD4SP0@i-mtaout6.012.net.il>; Mon, 02 Mar 2009 21:26:38 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 02 Mar 2009 14:43:42 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:25921 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 2497@emacsbugs.donarmstrong.com, uwe.siart@tum.de > Date: Mon, 02 Mar 2009 10:25:45 -0500 > > So, again, the bug is in the ordering Actually, the OP was complaining that, even with this ordering, Emacs 23 did TRT for him, and that a recent change broke that. That bug is fixed now, I believe, so you are talking about a more general problem. > we have to figure out which code ends up putting latin-1 before utf-8 in > the coding system priority. Well, I think this is fairly easy: set-locale-environment does it. Observe: (defun set-locale-environment (&optional locale-name frame) "Set up multi-lingual environment for using LOCALE-NAME. This sets the language environment, the coding system priority, the default input method and sometimes other things. ... (let ((language-name (locale-name-match locale locale-language-names)) (charset-language-name (locale-name-match locale locale-charset-language-names)) (default-eol-type (coding-system-eol-type default-buffer-file-coding-system)) (coding-system (or (locale-name-match locale locale-preferred-coding-systems) (when locale (if (string-match "\\.\\([^@]+\\)" locale) (locale-charset-to-coding-system (match-string 1 locale))))))) ... (when (and (not frame) coding-system (not (coding-system-equal coding-system locale-coding-system))) >>>>> (prefer-coding-system coding-system) ;; Fixme: perhaps prefer-coding-system should set this too. ;; But it's not the time to do such a fundamental change. (setq default-sendmail-coding-system coding-system) (setq locale-coding-system coding-system)))) Even the doc string says that the coding system priority is set according to the locale's native encoding.