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: Wierd encoding error with `setenv' Date: 25 Feb 2003 14:40:57 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1046151707 23136 80.91.224.249 (25 Feb 2003 05:41:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Feb 2003 05:41:47 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18nXqb-000612-00 for ; Tue, 25 Feb 2003 06:41:45 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18nY6P-00068T-00 for ; Tue, 25 Feb 2003 06:58:05 +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 18nXqQ-000711-08 for emacs-devel@quimby.gnus.org; Tue, 25 Feb 2003 00:41:34 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18nXqB-0006fM-00 for emacs-devel@gnu.org; Tue, 25 Feb 2003 00:41:19 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18nXq5-0006Ni-00 for emacs-devel@gnu.org; Tue, 25 Feb 2003 00:41:14 -0500 Original-Received: from tyo201.gate.nec.co.jp ([210.143.35.51]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18nXpu-00068n-00; Tue, 25 Feb 2003 00:41:03 -0500 Original-Received: from mailgate3.nec.co.jp ([10.7.69.194])h1P5eww09418; Tue, 25 Feb 2003 14:40:58 +0900 (JST) Original-Received: from mailsv.nec.co.jp (mailgate52.nec.co.jp [10.7.69.198]) by mailgate3.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id h1P5ewL02406; Tue, 25 Feb 2003 14:40:58 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp ([10.30.114.133]) by mailsv.nec.co.jp (8.11.6/3.7W-MAILSV-NEC) with ESMTP id h1P5evq20715; Tue, 25 Feb 2003 14:40:57 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) id h1P5evB06730; Tue, 25 Feb 2003 14:40:57 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 526E93736; Tue, 25 Feb 2003 14:40:57 +0900 (JST) Original-To: emacs-devel@gnu.org System-Type: i686-pc-linux-gnu Blat: Foop Original-Lines: 36 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:11929 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11929 I try to do this using today's CVS: M-x setenv RET lk25 RET /proj/soft2/uclinux/uclinux/linux-2.5.63-uc0 RET and got this error: setenv: Can't encode `lk25=/proj/soft2/uclinux/uclinux/linux-2.5.63-uc0' with `locale-coding-system' What's wierd is that I _don't_ get an error if I invoke the same command via C-x ESC ESC (repeat-complex-command). Looking at the code for `setenv,' I'm not sure what's going on; in this snippet (which is the only place the above error occurs): (if (and (multibyte-string-p variable) locale-coding-system) (unless (memq (coding-system-base locale-coding-system) (find-coding-systems-string (concat variable value))) (error "Can't encode `%s=%s' with `locale-coding-system'" variable (or value ""))) ... the call to multibyte-string-p seems to be odd -- if I just evaluate (multibyte-string-p "lk25") it returns nil, but if I get an error backtrace so that `variable' is bound to "lk25", and evaluate (multibyte-string-p variable), then it returns t! Since (find-coding-systems-string (concat variable value)) always seems to return just '(undecided), something seems dreadfully wrong. [I'm confused about what `multibyte-string-p' actually _means_, by the way -- shouldn't it only ever return t if the string contains non-ascii characters?] -Miles -- 97% of everything is grunge