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#13515: 24.3.50; file-name operating functions are broken on Japanese Windows Date: Wed, 23 Jan 2013 18:21:16 +0200 Message-ID: <83ham7na4j.fsf@gnu.org> References: <87txqa7ikj.wl%%xmue@d1.dion.ne.jp> <834ni9o1oz.fsf@gnu.org> <87r4lcutm8.wl%%xmue@d1.dion.ne.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1358958120 15022 80.91.229.3 (23 Jan 2013 16:22:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jan 2013 16:22:00 +0000 (UTC) Cc: 13515@debbugs.gnu.org To: Kazuhiro Ito Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 23 17:22: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 1Ty35d-0002jf-0R for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 17:22:17 +0100 Original-Received: from localhost ([::1]:53700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty35L-0003Mq-M6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 11:21:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty35A-0003Gb-EJ for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 11:21:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty359-0000H4-4I for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 11:21:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty359-0000Go-16 for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 11:21:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ty36L-00085x-Ml for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 11:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Jan 2013 16:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13515 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13515-submit@debbugs.gnu.org id=B13515.135895817631106 (code B ref 13515); Wed, 23 Jan 2013 16:23:01 +0000 Original-Received: (at 13515) by debbugs.gnu.org; 23 Jan 2013 16:22:56 +0000 Original-Received: from localhost ([127.0.0.1]:46625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ty36F-00085e-Aa for submit@debbugs.gnu.org; Wed, 23 Jan 2013 11:22:55 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:40532) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ty36D-00085X-MR for 13515@debbugs.gnu.org; Wed, 23 Jan 2013 11:22:54 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MH3009006R9O800@a-mtaout21.012.net.il> for 13515@debbugs.gnu.org; Wed, 23 Jan 2013 18:21:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MH30093I6RDHU90@a-mtaout21.012.net.il>; Wed, 23 Jan 2013 18:21:14 +0200 (IST) In-reply-to: <87r4lcutm8.wl%%xmue@d1.dion.ne.jp> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:70214 Archived-At: > Date: Wed, 23 Jan 2013 18:38:23 +0900 > From: Kazuhiro Ito > Cc: 13515@debbugs.gnu.org > > > > In addition, that change also let the below code fail. > > > > > > (let ((file-name-coding-system 'cp1252)) > > > (expand-file-name "漢字" "C:/")) > > > > > > -> "c:/ " > > > > IMO, this snippet doesn't make sense and cannot be supported. > > expand-file-name calls a number of system APIs which need the file > > name be encoded, so using file-name-coding-system that cannot possibly > > encode a file name is not supposed to work. > > > > Do you have a real-life situation where such cases emerge and need to > > be supported? > > None for me, sorry for inappropriate example. But the docstring of > w32-downcase-file-names says it affects remote file names and the fix > for Bug#12933 also affects other functions without using system APIs > (e.g., file-name-directory). On Windows, file-name-directory and similar functions do call system APIs, for 2 reasons: (1) down-casing file names under w32-downcase-file-names, and (2) advancing by characters in DBCS locales, which can only be supported if file-name-coding-system is one of the codepages known to Windows. > I guess it would be better that these functions (except ones using > system APIs) didn't depend on codepage. Does Emacs neither support > the below code? > > (let ((file-name-coding-system 'cp1252)) > (file-name-directory "漢字/")) > > -> " /" Well, "漢字/" is not a remote file name, so it is still subject to the limitation that only file names that can be encoded by the file-name-coding-system are supported. But even using a remote file name, such as "/foo@bar.com:漢字/", gets butchered by file-name-directory. However, this is a much broader issue, related to Tramp and to other non-Windows specific aspects of file-name handling, so I will start a discussion about that on emacs-devel. Thanks for bringing up this point.