From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MJ Chan Newsgroups: gmane.emacs.devel Subject: Re: file-attribute on certain Chinese filenames failed Date: Sat, 17 Feb 2007 10:09:16 -0500 Message-ID: <17879.6812.227000.712283@MJ.T40.T40> References: <45c9d948.5c6acfa4.4c9b.ffffeb01@mx.google.com> <17873.21871.414000.223392@MJ.T40.T40> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1171771465 9455 80.91.229.12 (18 Feb 2007 04:04:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 18 Feb 2007 04:04:25 +0000 (UTC) Cc: emacs-devel@gnu.org, handa@m17n.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 18 05:04:18 2007 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 1HIdHe-0006vY-6f for ged-emacs-devel@m.gmane.org; Sun, 18 Feb 2007 05:04:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HIdHd-0008Ut-PR for ged-emacs-devel@m.gmane.org; Sat, 17 Feb 2007 23:04:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HIRBi-0005Pm-LS for emacs-devel@gnu.org; Sat, 17 Feb 2007 10:09:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HIRBh-0005Nz-L6 for emacs-devel@gnu.org; Sat, 17 Feb 2007 10:09:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HIRBh-0005Nh-E3 for emacs-devel@gnu.org; Sat, 17 Feb 2007 10:09:21 -0500 Original-Received: from wx-out-0506.google.com ([66.249.82.230]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HIRBh-0001rG-22 for emacs-devel@gnu.org; Sat, 17 Feb 2007 10:09:21 -0500 Original-Received: by wx-out-0506.google.com with SMTP id s17so1210538wxc for ; Sat, 17 Feb 2007 07:09:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-type:content-transfer-encoding:message-id:date:from:to:cc:subject:x-signature:in-reply-to:references:x-spam-processed:x-mdremoteip:x-return-path; b=EBRhk3MZyHvuvzxV0GeWCybJ/rn3UXhoFDqPS3cmCEBweXHWk67fEtwN/YjD5V483I585/kSW+7nwH/3RZMMV6va5Qy7KLzeoXAJz+hJAyYHbYTPv/fF+8LjOBj4uczd3j7Rrm2hYWlwFfOpSr4oabnVWXXCn4dAIp3OQABUSsM= Original-Received: by 10.90.31.19 with SMTP id e19mr5525184age.1171724960296; Sat, 17 Feb 2007 07:09:20 -0800 (PST) Original-Received: from greenplace.page.us ( [69.138.161.132]) by mx.google.com with ESMTP id 7sm6403842agc.2007.02.17.07.09.20; Sat, 17 Feb 2007 07:09:20 -0800 (PST) Original-Received: from T40 ([127.0.0.1]) by local (greenplace.page.us [127.0.0.1]) (MDaemon.PRO.v6.8.5.R) with ESMTP id 2-md50000000003.tmp; Sat, 17 Feb 2007 10:09:17 -0500 X-Signature: mjchan 1e7039c143c9c7f50ab35a7053107bd9 In-Reply-To: X-Spam-Processed: greenplace.page.us, Sat, 17 Feb 2007 10:09:17 -0500 (not processed: spam filter disabled) X-MDRemoteIP: 127.0.0.1 X-Return-Path: mjchan.inbox@gmail.com X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-Mailman-Approved-At: Sat, 17 Feb 2007 23:04:07 -0500 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:66497 Archived-At: Thanks for pointing out w32.c in which function stat is defined. I thought Emacs used windows native stat.=20 Indeed, the problem is in stat, which calls strpbrk for checking invalid filename, (*?|<>\"). The Chinese/Big5 character that I have problem with contains '|'.=20 I also did some test with windows native stat call and it did not fail with that Chinese filename. >>>>> On Saturday, February 17 2007, Eli Zaretskii said: >> Date: Tue, 13 Feb 2007 01:06:39 -0500 >> From: MJ Chan >> Cc: emacs-devel@gnu.org >>=20 >> The same code you used did not cause write-region to fail on my >> XP. That is, the file "=B7|" was written correctly. But again, >> file-attributes returned nil. > Could you perhaps step with a debugger into the function `stat' (= in > w32.c) and see where it fails in this case? > I tried to reproduce this on Windows, but couldn't: file-attribut= es > works for me with non-ASCII file names. However, I don't have ac= cess > to a Chinese Windows system.