From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Strange behaviour with dired and UTF8 Date: Wed, 7 May 2003 19:40:22 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200305071631.h47GVQiM015312@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1052330288 27975 80.91.224.249 (7 May 2003 17:58:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 7 May 2003 17:58:08 +0000 (UTC) Cc: Kenichi Handa Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 07 19:58:05 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19DT9j-0007Aa-00 for ; Wed, 07 May 2003 19:56:39 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19DTDo-0006XV-00 for ; Wed, 07 May 2003 20:00:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DT96-0008Jw-08 for emacs-devel@quimby.gnus.org; Wed, 07 May 2003 13:56:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19DT7E-0007E2-00 for emacs-devel@gnu.org; Wed, 07 May 2003 13:54:04 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19DT6g-0006rT-00 for emacs-devel@gnu.org; Wed, 07 May 2003 13:53:31 -0400 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DSv8-0000qt-00; Wed, 07 May 2003 13:41:34 -0400 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h47IW0S3025284; Wed, 7 May 2003 20:32:01 +0200 Original-To: "Stefan Monnier" In-Reply-To: <200305071631.h47GVQiM015312@rum.cs.yale.edu> X-Mailer: Apple Mail (2.552) Original-cc: rms@gnu.org Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13753 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13753 onsdagen den 7 maj 2003 kl 18.31 skrev Stefan Monnier: >> Say I have two files, one in UTF-8 and one in latin-1. Emacs has only >> one coding system for file names, say it is latin-1. > > Question: how do other applications deal with such situations ? > > I mean, of course Emacs should do better than the rest of the crowd, > but if most/all other applications fail miserably, then it's unlikely > that people will use such setups and it would be wrong for Emacs to > make it easier to create such a setup (unless maybe only Emacs > will ever care about those file names, of course). I can only say that GNOME (Nautilus) deals with this fine, better than most. It can actually display two files, one in latin-1 and the other in UTF-8 that has the same display representation so it looks like the two files have the same name. When clicking on them (to open for example), it opens the correct file (I use the size of the files to tell them apart). When renaming a file, it uses UTF-8 always. I think this is as good as it gets. I don't know in detail, but given that UTF-8 is so fundamental to GNOME, I think Nautilus first tries UTF-8, and if the name isn't valid UTF-8, it tries the users locale. Actually Nautilus behaves better than most other GNOME applications. For example, gedit always tries UTF-8 for displaying the file name and says "invalid UTF-8" if that fails. KDE (Konquerer) seems to use the locale character set always. Other systems can change the view character set. Much like you can do in Netscape/Mozilla. Open up a directory and then you can toggle the coding system used to display file names (in Mozilla: View -> Character coding). This is what I thought Emacs could do, but it lost the original file name. Jan D.