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: Sat, 26 Oct 2013 10:50:06 +0300 Message-ID: <83zjpwfp3l.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1382773876 5024 80.91.229.3 (26 Oct 2013 07:51:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Oct 2013 07:51:16 +0000 (UTC) Cc: 15260@debbugs.gnu.org To: rgm@gnu.org, Stefan Monnier , Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 26 09:51:18 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 1VZyeT-0007VS-Ul for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2013 09:51:18 +0200 Original-Received: from localhost ([::1]:33768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZyeT-0007rV-BM for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Oct 2013 03:51:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZyeL-0007rP-8F for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 03:51:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZyeF-00010L-Bn for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 03:51:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZyeF-00010H-8b for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 03:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VZyeE-0003l9-BS for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 03:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Oct 2013 07:51:02 +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.138277382414382 (code B ref 15260); Sat, 26 Oct 2013 07:51:02 +0000 Original-Received: (at 15260) by debbugs.gnu.org; 26 Oct 2013 07:50:24 +0000 Original-Received: from localhost ([127.0.0.1]:44574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZydb-0003jt-VM for submit@debbugs.gnu.org; Sat, 26 Oct 2013 03:50:24 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:48176) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZydY-0003je-MC for 15260@debbugs.gnu.org; Sat, 26 Oct 2013 03:50:21 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MV900500N33XZ00@a-mtaout20.012.net.il> for 15260@debbugs.gnu.org; Sat, 26 Oct 2013 10:50:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MV90056YN3PJJ90@a-mtaout20.012.net.il>; Sat, 26 Oct 2013 10:50:13 +0300 (IDT) In-reply-to: <8361slgnhk.fsf@gnu.org> 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:79668 Archived-At: > Date: Fri, 25 Oct 2013 22:27:19 +0300 > From: Eli Zaretskii > Cc: 15260@debbugs.gnu.org > > > Date: Fri, 25 Oct 2013 21:46:52 +0300 > > From: Eli Zaretskii > > Cc: 15260@debbugs.gnu.org > > > > > but there are still > > > problems later on, again related to Emacs mistakenly believing that > > > certain directories do not exist, when they do (Warning: arch-dependent > > > data dir `...' No such file or directory; etc). > > > > > > The "non-ascii srcdir == builddir" case fails even earlier, due to not > > > finding etc. > > > > OK, I will take a closer look. Thanks for the info. > > I think I see the problem. All those PATH_* variables that come from > epaths.h yield encoded file names (because they were written by the > shell). But we never decode them before using them in init_callproc > and init_callproc_1. Similar things happen with decode_env_path: it > calls 'getenv', but never decodes the values it gets from that. > > I will take a crack on fixing these. We definitely need to decode file names in init_callproc_1, init_callproc, and init_lread. But here's where things get hairy: when temacs starts, preloaded Lisp files are not yet loaded, and consequently file-name-coding-system and default-file-name-coding-system are both nil. In such a case, currently DECODE_FILE is a no-op. So we need some way of getting temacs to know what coding-system to use to decode file names during its initialization phase, without relying on the database we have in locale-language-names. This probably calls for a separate variable, init-file-name-coding-system, say. But how to assign a correct value to it? I understand that most Posix systems nowadays use UTF-8 for file names, so I guess we can fall back on that. On MS-Windows, there's a system call that returns the necessary information, so there's no problem for MS-Windows. The question is what to do for Posix systems that don't use UTF-8? I see 2 possibilities: . Try to parse the value of LANG with some shell or Sed script, and come up with a suitable value. . Ask the user to specify the encoding as a switch to the configure script. In both cases, communicate the value to temacs via --eval on its command line. Comments and opinions are welcome.