From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46382 Path: main.gmane.org!not-for-mail From: Hal Snyder Newsgroups: gmane.emacs.gnus.general Subject: Re: detecting encoding for Japanese Date: Tue, 03 Sep 2002 16:43:52 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <87it1m21gn.fsf@ghidra.vail> References: <87sn0y43mc.fsf@ghidra.vail> <87fzwxycy9.fsf@ghidra.vail> <873csxws40.fsf@ghidra.vail> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1031089419 15547 127.0.0.1 (3 Sep 2002 21:43:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Sep 2002 21:43:39 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mLST-00042X-00 for ; Tue, 03 Sep 2002 23:43:37 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17mLT3-0003un-00; Tue, 03 Sep 2002 16:44:13 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 03 Sep 2002 16:44:48 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA26525 for ; Tue, 3 Sep 2002 16:44:34 -0500 (CDT) Original-Received: (qmail 9250 invoked by alias); 3 Sep 2002 21:43:54 -0000 Original-Received: (qmail 9245 invoked from network); 3 Sep 2002 21:43:54 -0000 Original-Received: from chrobd01.vailsys.com (postfix@63.210.102.138) by gnus.org with SMTP; 3 Sep 2002 21:43:54 -0000 Original-Received: from area51.vail (area51.vail [192.168.129.30]) by chrobd01.vailsys.com (Postfix) with ESMTP id 4CC674987 for ; Tue, 3 Sep 2002 16:43:53 -0500 (CDT) Original-Received: from ghidra.vail (ghidra.vail [192.168.129.44]) by area51.vail (8.9.3/8.9.3) with ESMTP id QAA69396 for ; Tue, 3 Sep 2002 16:43:53 -0500 (CDT) (envelope-from hal@vailsys.com) Original-Received: by ghidra.vail (Postfix, from userid 1000) id 0053566AB7; Tue, 3 Sep 2002 16:43:52 -0500 (CDT) Original-To: ding@gnus.org In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Mon, 02 Sep 2002 19:31:15 +0200") Original-Lines: 33 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-unknown-openbsd2.7) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46382 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46382 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: > But I wonder if there is a right way to do this? The right way, > IMHO, would be to use the standard coding system priorities in > principle, except that they are slightly modified to prefer > iso-2022-jp over euc-jp. Hm. "emacs -q -no-site-file", then setting > the Japanese language environment, tells me: > > /---- > | Priority order for recognizing coding systems when reading files: > | 1. iso-2022-jp (alias: junet) > | 2. japanese-iso-8bit (alias: euc-japan-1990 euc-japan euc-jp) > | 3. japanese-shift-jis (alias: shift_jis sjis) > | 4. iso-2022-jp-2=20 > | 5. iso-latin-1 (alias: iso-8859-1 latin-1) > | 6. iso-2022-7bit=20 > | 7. iso-2022-8bit-ss2=20 > | 8. emacs-mule=20 > | 9. raw-text=20 > | 10. chinese-big5 (alias: big5 cn-big5) > | 11. no-conversion=20 > | 12. mule-utf-8 (alias: utf-8) > \---- > > So it seems that Emacs already prefers iso-2022-jp over euc-jp. It's > not clear to me where the problem comes from. Do you get a different > output from M-x describe-coding-system RET RET? I don't think it's necessarily an issue of priorities. When there is an incoming message without Content-type: properly set, it seems that only iso-2022-jp is tried. The previously mentioned "AI" used when opening a file, if applied to messages, should find the right encoding - or at least distinguish iso/euc/sjis/utf8, regardless of priorities.