From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46340 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: detecting encoding for Japanese Date: Tue, 03 Sep 2002 07:38:34 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1031006321 1340 127.0.0.1 (2 Sep 2002 22:38:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2002 22:38:41 +0000 (UTC) Cc: ding@gnus.org 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 17lzqA-0000LF-00 for ; Tue, 03 Sep 2002 00:38:39 +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 17lzqs-0004fD-00; Mon, 02 Sep 2002 17:39:22 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 02 Sep 2002 17:39:57 -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 RAA23772 for ; Mon, 2 Sep 2002 17:39:43 -0500 (CDT) Original-Received: (qmail 11106 invoked by alias); 2 Sep 2002 22:39:04 -0000 Original-Received: (qmail 11101 invoked from network); 2 Sep 2002 22:39:04 -0000 Original-Received: from unknown (HELO mars.web-hosting.com) (207.228.244.150) by gnus.org with SMTP; 2 Sep 2002 22:39:04 -0000 Original-Received: from localhost ([207.228.245.242]) by mars.web-hosting.com (8.11.1/8.11.1) with ESMTP id g82Md2Y03877; Mon, 2 Sep 2002 18:39:02 -0400 (EDT) Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (sparc-sun-solaris2.6) Cancel-Lock: sha1:IpfM866VRmmi6JtFifn3wNm4kac= X-Hashcash: 020902:Kai.Grossjohann@CS.Uni-Dortmund.DE:cfc88eecb0727ee9 X-Hashcash: 020902:ding@gnus.org:ec82fac10eb2d3b2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46340 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46340 >>>>> In >>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=C3=9Fjohann) wrote: [...] Kai> Okay. So it seems that Japanese users always want what you are Kai> saying. Kai> What do you think about changing the default value to the Kai> following expression? Kai> (when (string=3D current-language-environment "Japanese") Kai> '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8)) Kai> We could add a comment saying that we still need to investigate Kai> which values are good for other language environments. That's good. Kai> But I wonder if there is a right way to do this? The right way, Kai> IMHO, would be to use the standard coding system priorities in Kai> principle, except that they are slightly modified to prefer Kai> iso-2022-jp over euc-jp. Hm. "emacs -q -no-site-file", then Kai> setting the Japanese language environment, tells me: Kai>| Priority order for recognizing coding systems when reading Kai>| files: 1. iso-2022-jp (alias: junet) Kai>| 2. japanese-iso-8bit (alias: euc-japan-1990 euc-japan euc-jp) Kai>| 3. japanese-shift-jis (alias: shift_jis sjis) Kai>| 4. iso-2022-jp-2 Kai>| 5. iso-latin-1 (alias: iso-8859-1 latin-1) [...] Although surely it becomes so in almost systems, please see the function `setup-japanese-environment-internal' doing: (defun setup-japanese-environment-internal () (cond ((eq system-type 'ms-dos) (prefer-coding-system 'japanese-shift-jis)) ((eq system-type 'usg-unix-v) (prefer-coding-system 'japanese-iso-8bit))) [...]) This is defined in language/japan-util.el and which will be called from `(set-language-environment "Japanese")'. Because of this, the coding priority in Solaris will be the order of: (mapcar 'symbol-value coding-category-list) =3D> (japanese-iso-8bit iso-2022-jp japanese-shift-jis iso-2022-jp-2 iso-latin-1 iso-2022-7bit iso-2022-8bit-ss2 emacs-mule raw-text chinese-big5 nil no-conversion ...) I do not know whether only `usg-unix-v' is special, though. --=20 Katsumi Yamaoka