From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Foreign file names on MS-Windows Date: Sat, 22 Mar 2008 19:26:35 +0200 Message-ID: References: <47E527DD.9000006@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1206206929 22764 80.91.229.12 (22 Mar 2008 17:28:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Mar 2008 17:28:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 22 18:29:19 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jd7Ww-0003nd-CR for ged-emacs-devel@m.gmane.org; Sat, 22 Mar 2008 18:29:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jd7WL-0000yc-KT for ged-emacs-devel@m.gmane.org; Sat, 22 Mar 2008 13:28:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jd7WH-0000wG-7Z for emacs-devel@gnu.org; Sat, 22 Mar 2008 13:28:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jd7WG-0000uv-DY for emacs-devel@gnu.org; Sat, 22 Mar 2008 13:28:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jd7WG-0000ud-1k for emacs-devel@gnu.org; Sat, 22 Mar 2008 13:28:36 -0400 Original-Received: from mtaout6.012.net.il ([84.95.2.16]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jd7WC-000114-8z; Sat, 22 Mar 2008 13:28:32 -0400 Original-Received: from HOME-C4E4A596F7 ([84.228.236.188]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0JY500MUR7R1C891@i-mtaout6.012.net.il>; Sat, 22 Mar 2008 19:40:13 +0200 (IST) In-reply-to: <47E527DD.9000006@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93195 Archived-At: > Date: Sat, 22 Mar 2008 15:38:05 +0000 > From: Jason Rumney > CC: emacs-devel@gnu.org > > Eli Zaretskii wrote: > > A temporary bandaid, and the only solution that is practical for Emacs > > 22, is to modify `readdir' to return the 8+3 aliase of the problematic > > file name instead of the long name. > > Seems OK to me. Thanks for the feedback. > Is readdir really the only place that needs to be fixed though? I think so, yes. All the primitives that I could have thought about call `readdir' to get the file names. file-attributes obviously doesn't, but if it is called with a file name that came from `readdir', then file-attributes will work correctly as well. If file-attributes is called with a file name that cannot be encoded in the current codepage, it will fail, but that problem has no solution without full-blown UTF-16 file name support, I think. But if you find other primitives that fail for such file names, please name them. Right now, the only ones that call FindFirstFile, apart of `readdir', are `stat' and `w32_get_long_filename'. I don't think the latter can benefit of the kind of change I made in `readdir'.