From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: image file with Chinese file names Date: Thu, 30 Mar 2006 22:10:51 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1143774715 14856 80.91.229.2 (31 Mar 2006 03:11:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 31 Mar 2006 03:11:55 +0000 (UTC) Cc: mjchan@myrealbox.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 31 05:11:54 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FPA3E-0008Rh-EZ for ged-emacs-devel@m.gmane.org; Fri, 31 Mar 2006 05:11:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FPA3D-0005hC-Q4 for ged-emacs-devel@m.gmane.org; Thu, 30 Mar 2006 22:11:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FPA2G-0004r7-Ty for emacs-devel@gnu.org; Thu, 30 Mar 2006 22:10:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FPA2G-0004qV-Hp for emacs-devel@gnu.org; Thu, 30 Mar 2006 22:10:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FPA2G-0004qR-2G for emacs-devel@gnu.org; Thu, 30 Mar 2006 22:10:52 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FPA4Z-0006Zv-4l for emacs-devel@gnu.org; Thu, 30 Mar 2006 22:13:15 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FPA2F-0001vR-23; Thu, 30 Mar 2006 22:10:51 -0500 Original-To: Kenichi Handa In-reply-to: (message from Kenichi Handa on Wed, 29 Mar 2006 10:21:56 +0900) 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:52244 Archived-At: I found that image.c (and image.el) doesn't pay attention to filename encoding. For instance, when I visit a file "À.png", Emacs crashes in png_load() as this: Program received signal SIGSEGV, Segmentation fault. 0x40346777 in fclose () from /lib/libc.so.6 (gdb) bt 10 As an image file name is passed from function to function, I don't understand where we should put the interface between decoded filename and encoded filename. I looked at image.c, and I think the right place for encoding is the end of x_find_image_file. That is, it should return an encoded name. That appears correct for all calls to that function, though I could not perfectly understand all of the callers. Please try that. (Please update the comments on x_find_image_file to say its value has been encoded.)