From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15260: cannot build in a directory with non-ascii characters Date: Sun, 27 Oct 2013 18:11:46 +0200 Message-ID: <83mwlug0cd.fsf@gnu.org> References: <83y55ih6g3.fsf@gnu.org> <81ppqums9o.fsf@fencepost.gnu.org> <83hac5h1ha.fsf@gnu.org> <83bo2dgq36.fsf@gnu.org> <837gd1gpcz.fsf@gnu.org> <8361slgnhk.fsf@gnu.org> <83zjpwfp3l.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1382890333 15715 80.91.229.3 (27 Oct 2013 16:12:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2013 16:12:13 +0000 (UTC) Cc: 15260@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 17:12:16 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VaSwq-0006Iy-7A for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 17:12:16 +0100 Original-Received: from localhost ([::1]:38243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaSwp-0000nr-OW for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 12:12:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaSwh-0000nb-Jg for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaSwc-0005kt-A5 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:12:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaSwc-0005kp-6l for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VaSwb-0005so-Nf for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 12:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2013 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15260 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15260-submit@debbugs.gnu.org id=B15260.138289032022604 (code B ref 15260); Sun, 27 Oct 2013 16:12:01 +0000 Original-Received: (at 15260) by debbugs.gnu.org; 27 Oct 2013 16:12:00 +0000 Original-Received: from localhost ([127.0.0.1]:47627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaSwa-0005sW-2m for submit@debbugs.gnu.org; Sun, 27 Oct 2013 12:12:00 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:59256) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaSwW-0005sH-L3 for 15260@debbugs.gnu.org; Sun, 27 Oct 2013 12:11:57 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MVC002004YIHT00@a-mtaout22.012.net.il> for 15260@debbugs.gnu.org; Sun, 27 Oct 2013 18:11:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MVC002LD4ZP2RB0@a-mtaout22.012.net.il>; Sun, 27 Oct 2013 18:11:49 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79696 Archived-At: > From: Stefan Monnier > Cc: rgm@gnu.org, Kenichi Handa , 15260@debbugs.gnu.org > Date: Sun, 27 Oct 2013 00:28:36 -0400 > > I don't understand why it wouldn't work to just treat those strings as > "binary" (i.e. keep them undecoded in unibyte strings). Then encoding > would be a noop and that should hence end up in the right byte-sequence > sent to the OS primitives. Not sure I'm following you here. I presume you aren't asking why we generally hold file names in decoded form inside Emacs, nor suggesting that we switch to storing them as undecoded unibyte strings. So I guess you are asking why the particular piece of code being discussed here couldn't keep file names as unibyte strings, is that your question? If so, then the answer is "it could, but that would be even more hair." The problem is that the code involved in this (specifically, init_callproc_1, init_callproc, and probably also init_cmdargs and init_lread) is not something specifically written to stat the directories from epaths.h and announce their non-existence. That code populates important variables with names of files and directories and lists of directories that are henceforth used in Emacs all over the place. Notable examples are data-directory, doc-directory, exec-path, and load-path. Without populating these variables, temacs will not work, and the code which uses these variables assumes their values are decoded strings. The error messages are a by-product: as Emacs computes the values of these variables, it checks the files and directories for existence, and complains if they don't. The root cause is that unibyte strings get stored in variables used by Emacs on the assumption that they are decoded. Given the above, I'm not sure exactly what you are suggesting in practical terms. Can you elaborate?