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: environment variable don't get coding conversion Date: Mon, 27 Jan 2003 11:48:26 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301270248.LAA14270@etlken.m17n.org> References: <200301252205.h0PM5gsx029853@beta.mvs.co.il> <84r8b07z30.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1043636349 26090 80.91.224.249 (27 Jan 2003 02:59:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2003 02:59:09 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18czUJ-0006mf-00 for ; Mon, 27 Jan 2003 03:59:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18czYJ-0006ig-00 for ; Mon, 27 Jan 2003 04:03:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18czMR-0005h0-05 for emacs-devel@quimby.gnus.org; Sun, 26 Jan 2003 21:50:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18czLr-0005aE-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 21:50:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18czL1-0005Og-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 21:49:47 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18czKW-0005Fr-00 for emacs-devel@gnu.org; Sun, 26 Jan 2003 21:49:01 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0R2mQk12966; Mon, 27 Jan 2003 11:48:26 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0R2mQR16830; Mon, 27 Jan 2003 11:48:26 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id LAA14270; Mon, 27 Jan 2003 11:48:26 +0900 (JST) Original-To: kai.grossjohann@uni-duisburg.de In-reply-to: <84r8b07z30.fsf@lucy.is.informatik.uni-duisburg.de> (kai.grossjohann@uni-duisburg.de) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11112 In article <84r8b07z30.fsf@lucy.is.informatik.uni-duisburg.de>, kai.grossjo= hann@uni-duisburg.de (Kai Gro=DFjohann) writes: > "Ehud Karni" writes: >> I agree that to use non-ASCII environment variable name is not >> practical, so this problem is not really important, but the non-ASCII >> values are used a lot, and the practical way for ISO-8859-x is to >> have them in unibyte. > I guess the most important question is: which coding system is used > for values of environment variables? Emacs already has a number of > different coding systems; it's not clear to me which one of them, if > any, is appropriate for environment variables. > process-coding-system? file-name-coding-system? We must decode them by the locale-coding-system at startup time. But, we have to check the values of LC_ALL, LC_CTYPE, or LANG on encoding. Those values may be changed by a user by M-x setenv or by the direct modification of process-environment (in the case that it is kept exposed). > And what happens if you do (setenv foo bar) and bar is a string which > can't be encoded in the coding system specified for environment > variables? We can signal an error. Or, it may be ok to force encoding it by the locale coding system (usually results in "????"), and use the result blindly because such an env. variable is anyway not usable in a subprocess. --- Ken'ichi HANDA handa@m17n.org