From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 2497@emacsbugs.donarmstrong.com, uwe.siart@tum.de
Subject: bug#2497: 23.0.91; Fails to read UTF-8 on Win2k
Date: Mon, 02 Mar 2009 21:25:58 +0200 [thread overview]
Message-ID: <ud4czohfd.fsf@gnu.org> (raw)
In-Reply-To: <jwvvdqsvtfw.fsf-monnier+emacsbugreports@gnu.org>
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>, 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.
next prev parent reply other threads:[~2009-03-02 19:25 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <uzlg6oiq3.fsf@gnu.org>
2009-02-17 10:35 ` bug#2354: 23.0.90; Emacs fails to detect utf-8 encoding with language environment Latin-1 David Engster
2009-02-17 16:45 ` Juanma Barranquero
2009-02-17 18:04 ` David Engster
2009-02-28 12:30 ` bug#2354: marked as done (23.0.90; Emacs fails to detect utf-8 encoding with language environment Latin-1) Emacs bug Tracking System
2009-02-27 14:10 ` bug#2497: 23.0.91; Fails to read UTF-8 on Win2k Uwe Siart
2009-02-27 16:03 ` Eli Zaretskii
2009-02-27 16:48 ` Uwe Siart
2009-02-27 18:19 ` Eli Zaretskii
2009-02-27 20:35 ` Uwe Siart
2009-02-28 4:40 ` Stefan Monnier
2009-02-28 8:17 ` Uwe Siart
2009-02-28 10:14 ` David Engster
2009-02-28 12:09 ` Eli Zaretskii
2009-02-28 14:16 ` Jason Rumney
2009-02-28 14:31 ` David Engster
2009-02-28 22:00 ` Stefan Monnier
2009-02-28 10:49 ` Eli Zaretskii
2009-02-28 12:16 ` Uwe Siart
2009-02-28 22:04 ` Stefan Monnier
2009-03-02 11:43 ` Kenichi Handa
2009-03-02 15:25 ` Stefan Monnier
2009-03-02 19:25 ` Eli Zaretskii [this message]
2009-03-03 16:34 ` Stefan Monnier
2009-02-27 16:11 ` Juanma Barranquero
2009-02-27 16:16 ` Juanma Barranquero
2009-02-27 16:27 ` Uwe Siart
2009-02-27 16:32 ` Juanma Barranquero
2009-02-27 16:23 ` Uwe Siart
2009-02-27 16:38 ` Juanma Barranquero
2009-02-27 18:19 ` Eli Zaretskii
2009-02-27 20:38 ` Juanma Barranquero
2009-02-28 1:29 ` Jason Rumney
2009-02-27 17:02 ` Leo
2009-02-27 17:46 ` David Engster
2009-02-27 21:15 ` Uwe Siart
2009-02-28 1:32 ` Jason Rumney
2009-02-28 1:35 ` Processed (with 5 errors): " Emacs bug Tracking System
2009-02-27 23:34 ` bug#2497: 23.0.91; Fails to read UTF-8 on Windows2k Richard M Stallman
2009-02-28 9:47 ` Uwe Siart
2009-02-28 18:08 ` Richard M Stallman
2009-02-28 12:30 ` bug#2497: marked as done (23.0.91; Fails to read UTF-8 on Win2k) Emacs bug Tracking System
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ud4czohfd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=2497@emacsbugs.donarmstrong.com \
--cc=monnier@iro.umontreal.ca \
--cc=uwe.siart@tum.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).