From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/46346 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 15:19:19 +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=iso-2022-jp X-Trace: main.gmane.org 1031034100 14854 127.0.0.1 (3 Sep 2002 06:21:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 3 Sep 2002 06:21:40 +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 17m74D-0003rR-00 for ; Tue, 03 Sep 2002 08:21:38 +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 17m72m-0006Bp-00; Tue, 03 Sep 2002 01:20:08 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 03 Sep 2002 01:20:43 -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 BAA24443 for ; Tue, 3 Sep 2002 01:20:29 -0500 (CDT) Original-Received: (qmail 26615 invoked by alias); 3 Sep 2002 06:19:50 -0000 Original-Received: (qmail 26610 invoked from network); 3 Sep 2002 06:19:49 -0000 Original-Received: from unknown (HELO mars.web-hosting.com) (207.228.244.150) by gnus.org with SMTP; 3 Sep 2002 06:19:49 -0000 Original-Received: from localhost ([207.228.245.242]) by mars.web-hosting.com (8.11.1/8.11.1) with ESMTP id g836Jmr28864; Tue, 3 Sep 2002 02:19:48 -0400 (EDT) Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Informed Management, sparc-sun-solaris2.6) 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&( Cancel-Lock: sha1:n8qe1h37nv2iLXtnxiuZzRLIyFQ= X-Hashcash: 020903:Kai.Grossjohann@CS.Uni-Dortmund.DE:f051f1258b5a1c03 X-Hashcash: 020903:ding@gnus.org:348c9da5c2f14605 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:46346 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:46346 I'm sorry to bother you so many times. >>>>> In >>>>> Katsumi Yamaoka wrote: > Maybe the following value is much better(?): > (get-language-info current-language-environment 'coding-priority) I noticed the form may not provide a good value. If a user loads the jisx0213 module which is included in the Mule-UCS package, priority will be given to iso-2022-jp-3 or euc-jisx0213. Probably it is not related to the system-type: emacs-21.2 -batch -q -no-site-file (load "jisx0213") (set-language-environment "Japanese") (get-language-info current-language-environment coding-priority) => (iso-2022-jp-3-compatible utf-8 utf-16-le utf-16-be euc-jisx0213 japanese-shift-jisx0213 iso-2022-jp-2) (require 'mm-util) (let ((default-enable-multibyte-characters t) (mm-coding-system-priorities nil)) (with-temp-buffer (insert "あいうえお") (mm-find-mime-charset-region (point-min) (point-max)))) => (euc-jisx0213) After all, it is the best to adopt the way which you wrote. (defcustom mm-coding-system-priorities (cond ((string-= current-language-environment "Japanese") '(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8))) "Preferred coding systems for encoding outgoing mails....") -- Katsumi Yamaoka