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: Thu, 31 Oct 2013 21:41:04 +0200 Message-ID: <83habxcjov.fsf@gnu.org> References: <83hac5h1ha.fsf@gnu.org> <83bo2dgq36.fsf@gnu.org> <837gd1gpcz.fsf@gnu.org> <8361slgnhk.fsf@gnu.org> <83zjpwfp3l.fsf@gnu.org> <83mwlug0cd.fsf@gnu.org> <83bo2af4hh.fsf@gnu.org> <8361shfil7.fsf@gnu.org> <834n81fdp8.fsf@gnu.org> <83zjpseo1g.fsf@gnu.org> <838uxaei43.fsf@gnu.org> <83wqktcqdx.fsf@gnu.org> <83mwlpcmm7.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1383248568 2120 80.91.229.3 (31 Oct 2013 19:42:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Oct 2013 19:42:48 +0000 (UTC) Cc: 15260@debbugs.gnu.org To: monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 31 20:42:50 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 1Vby8n-0002T5-WA for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Oct 2013 20:42:50 +0100 Original-Received: from localhost ([::1]:59023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vby8n-0002LZ-Iu for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Oct 2013 15:42:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vby88-0001g9-3L for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2013 15:42:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vby82-000540-VM for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2013 15:42:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vby82-00053w-SF for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2013 15:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vby82-0002V5-BQ for bug-gnu-emacs@gnu.org; Thu, 31 Oct 2013 15:42: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: Thu, 31 Oct 2013 19:42: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.13832484899561 (code B ref 15260); Thu, 31 Oct 2013 19:42:02 +0000 Original-Received: (at 15260) by debbugs.gnu.org; 31 Oct 2013 19:41:29 +0000 Original-Received: from localhost ([127.0.0.1]:55495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vby7U-0002U8-TN for submit@debbugs.gnu.org; Thu, 31 Oct 2013 15:41:29 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:55343) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vby7S-0002To-F3 for 15260@debbugs.gnu.org; Thu, 31 Oct 2013 15:41:27 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MVJ00100T6LSD00@a-mtaout20.012.net.il> for 15260@debbugs.gnu.org; Thu, 31 Oct 2013 21:41:19 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MVJ001C0TCVPV40@a-mtaout20.012.net.il>; Thu, 31 Oct 2013 21:41:19 +0200 (IST) In-reply-to: <83mwlpcmm7.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:79835 Archived-At: > Date: Thu, 31 Oct 2013 20:37:52 +0200 > From: Eli Zaretskii > Cc: 15260@debbugs.gnu.org > > > From: Stefan Monnier > > Cc: handa@gnu.org, 15260@debbugs.gnu.org > > Date: Thu, 31 Oct 2013 14:09:39 -0400 > > > > So you mean that we have: > > - charset-map-path is a multibyte string. > > - the file-name encoding uses a charset that's not yet loaded. > > Yes. > > > How do we get into such a state? > > Not sure about the details, since I don't really understand when Emacs > needs to load the charset map. Perhaps the map is needed only when we > need to encode a string, not for decoding? Actually, as can be seen from load_charset_map, we do different things when the map is needed for decoding and for encoding. So what probably happened was that when the file names in load-path etc. were decoded from cpNNNN, the map file was loaded and load_charset_map did whatever was necessary to set up the decoder for this encoding. Then, when we need to encode a file name using the same cpNNNN, the map file is loaded again, and load_charset_map now sets up the encoder. When the decoder was set up, charset-map-path was still in unibyte form, so the whole thing worked, because ENCODE_FILE doesn't try to encode unibyte strings. But once charset-map-path itself was decoded, the recursive call to 'openp' inside load_charset_map_from_file tried to encode it, and triggered infinite recursion.