From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Setting file-name/process coding system from LANG Date: Fri, 15 Oct 2004 09:51:20 +0900 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097801547 21980 80.91.229.6 (15 Oct 2004 00:52:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Oct 2004 00:52:27 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 15 02:52:20 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 1CIGKS-00059H-00 for ; Fri, 15 Oct 2004 02:52:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CIGRZ-0004mL-Dy for ged-emacs-devel@m.gmane.org; Thu, 14 Oct 2004 20:59:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CIGRQ-0004mB-Na for emacs-devel@gnu.org; Thu, 14 Oct 2004 20:59:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CIGRP-0004ln-PR for emacs-devel@gnu.org; Thu, 14 Oct 2004 20:59:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CIGRP-0004lX-Lf for emacs-devel@gnu.org; Thu, 14 Oct 2004 20:59:31 -0400 Original-Received: from [202.32.8.202] (helo=tyo202.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CIGJe-0001Lw-0d; Thu, 14 Oct 2004 20:51:30 -0400 Original-Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.162] (may be forged)) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i9F0pNn29723; Fri, 15 Oct 2004 09:51:23 +0900 (JST) Original-Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i9F0pNX16353; Fri, 15 Oct 2004 09:51:23 +0900 (JST) Original-Received: from edtmg02.lsi.nec.co.jp ([10.26.16.202]) by mailsv5.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id i9F0pM508136; Fri, 15 Oct 2004 09:51:22 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg02.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id i9F0pLRA015225; Fri, 15 Oct 2004 09:51:21 +0900 (JST) Original-Received: from mctpc71 (mctpc71.ucom.lsi.nec.co.jp [10.30.118.121]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i9F0pKwt023368; Fri, 15 Oct 2004 09:51:20 +0900 (JST) Original-Received: by mctpc71 (Postfix, from userid 31295) id 8D2134A6; Fri, 15 Oct 2004 09:51:20 +0900 (JST) Original-To: rms@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Richard Stallman's message of "Thu, 14 Oct 2004 20:25:10 -0400") Original-Lines: 32 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:28405 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28405 Richard Stallman writes: > It seems to me that LANG should be enough to force filenames and process > I/O coding to use utf-8, regardless of the Emacs language-environment > setting > > Does LANG have this effect on other programs? In general yes, it seems too. Most importantly, the LANG setting determines how sub-programs invoked from Emacs encode their error messages, so Emacs should be using the same encoding for process I/O. > LANG itself should not control anything in Emacs directly, but maybe > it should be used toinitialize someting else that would control this. Yes -- and in fact it _already_ does this in Emacs. The problem is that setting the Emacs language-environment (with `set-language-environment') _overrides_ the initial settings made based on LANG. That's wrong in this case, I think. BTW, another possibly related issue is that if I start `emacs -q' with LANG=ja_JP, then the language-environment is automatically set to "Japanese" -- great! But if I start `emacs -q' with LANG=ja_JP.utf8, then the language environment is set to "utf-8", and that doesn't make much sense to me -- indeed the whole concept of a "utf-8 language environment" seems kind of weird. In this case I think it should instead (1) set the language-environt to "Japanese", and then (2) set the various I/O encodings to be `utf-8'. -Miles -- We have met the enemy, and he is us. -- Pogo