From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Setting file-name/process coding system from LANG Date: Wed, 20 Oct 2004 15:21:54 +0900 (JST) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200410200621.PAA29245@etlken.m17n.org> References: <200410181304.WAA24091@etlken.m17n.org> <200410191313.WAA27071@etlken.m17n.org> <20041019215111.GA9395@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1098253372 31419 80.91.229.6 (20 Oct 2004 06:22:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2004 06:22:52 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 08:22:40 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CK9rr-0001XR-00 for ; Wed, 20 Oct 2004 08:22:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK9zE-0004XP-KU for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2004 02:30:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CK9z6-0004Wj-VK for emacs-devel@gnu.org; Wed, 20 Oct 2004 02:30:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CK9z5-0004WP-Uu for emacs-devel@gnu.org; Wed, 20 Oct 2004 02:30:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CK9z5-0004WL-GZ for emacs-devel@gnu.org; Wed, 20 Oct 2004 02:30:07 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CK9rB-0003ce-Cs; Wed, 20 Oct 2004 02:21:58 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9K6Lt9d002494; Wed, 20 Oct 2004 15:21:55 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id i9K6LsF16681; Wed, 20 Oct 2004 15:21:54 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id PAA29245; Wed, 20 Oct 2004 15:21:54 +0900 (JST) Original-To: miles@gnu.org In-reply-to: <20041019215111.GA9395@fencepost> (message from Miles Bader on Tue, 19 Oct 2004 17:51:11 -0400) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28645 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28645 In article <20041019215111.GA9395@fencepost>, Miles Bader writes: > On Tue, Oct 19, 2004 at 10:13:53PM +0900, Kenichi Handa wrote: >> > When Emacs sees LANG=ja_JP.utf8, surely it can select the Japanese >> > language environment, then do something else to cause use of UTF8. >> > Surely it can do this without having an explicit language environment >> > for the combination of the two. >> >> Then a user can't recover that original setting when he once >> switch to, e.g., Latin-1. Just switching back to Japanese >> can't setup coding systems for utf8. > Why can't we do what I suggested earlier, and set `file-name-coding-system' > (and presumably some analogue for process I/O and terminal-coding-system) > instead of `default-file-name-coding-system' from the "utf8" portion of LANG? If it always sets file-name-coding-system, there's no need of having default-file-name-coding-system. And, that means that even if one changes to latin-1 lang. env., file-name-coding-system is still utf-8. Is it ok? Am I misunderstanding something? > Then `set-language-environment' could set `default-file-name-coding-system' > but it wouldn't actually have any effect -- which at least in this > circumstance seems correct. Other language-environment settings (like the > tutorial language etc) would have the proper effect. >> Another problem is the case of LANG=zh_CN.utf8. Currently >> we don't have Chinese lang. env. We only have Chinese-GB, >> Chinese-EUC-TW, Chinese-BIG5, Chinese-CNS. Which one to >> use? > Presumably whichever one best matches the "country" portion of LANG. It seems to be difficult. % locale -a|grep zh shows these: zh_CN zh_CN.gb18030 zh_CN.gb2312 zh_CN.gbk zh_CN.utf8 zh_HK zh_HK.big5hkscs zh_HK.utf8 zh_SG zh_SG.gb2312 zh_SG.gbk zh_TW zh_TW.big5 zh_TW.euctw zh_TW.utf8 --- Ken'ichi HANDA handa@m17n.org