From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Piet van Oostrum Newsgroups: gmane.emacs.help Subject: Re: File name completion on Mac OS X with German umlauts Date: Mon, 17 Mar 2008 15:07:58 +0100 Organization: Dept of Computer Science, Utrecht University, The Netherlands Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1205764915 16972 80.91.229.12 (17 Mar 2008 14:41:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 14:41:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 17 15:42:13 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JbGXB-0004F4-GG for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Mar 2008 15:41:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbGWb-0002mx-JJ for geh-help-gnu-emacs@m.gmane.org; Mon, 17 Mar 2008 10:41:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!feeder.erje.net!nuzba.szn.dk!pnx.dk!news.stack.nl!cs.uu.nl!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: adonis.cs.uu.nl Original-X-Trace: prometheus.cs.uu.nl 1205762938 6561 131.211.80.24 (17 Mar 2008 14:08:58 GMT) Original-X-Complaints-To: news@cs.uu.nl Original-NNTP-Posting-Date: Mon, 17 Mar 2008 14:08:58 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (darwin) Cancel-Lock: sha1:bKfG6eb7iYyQwrWe04niCffkHXE= Original-Xref: shelby.stanford.edu gnu.emacs.help:157097 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52468 Archived-At: >>>>> Nikolaj Schumacher (NS) wrote: >NS> Eli Zaretskii wrote: >>> It is only a ``problem'' if you accept the view that no two files in >>> the same directory can have names that are pronounced identically. >NS> No, it's not just that. >NS> Certainly, you could have files "X" and "Ⅹ" (the Roman numeral). Even >NS> if they look the same there is no problem (other than likely user >NS> confusion) in having both. >NS> However, the two types of "ü" are the same character, or at least >NS> functionally equivalent characters. They should be considered equal. >NS> But comparing them properly requires normalization >NS> (cf. http://www.unicode.org/unicode/reports/tr15/). >NS> OSX does normalization in its file system. GNU/Linux apparently does not. Right. In GNU/Linux a filename is just a sequence of bytes without interpretation. The interpretation is done by the programs. Nowadays modern GNU/Linux systems tend to use UTF-8 as the default interpretation. But if you would mount a filesystem from such a system on another one that has Latin-1 as the preferred encoding, your filenames with non-ASCII characters would look weird. And also a filename with ü as unnormalized UTF-8 and another one with ü as normalised UTF-8 would be different files, but in an ls listing they would look identical (the filenames, not the files). And I guess the normalised one would not complete on ü, but ir will on u, and the other one just the opposite. On Mac OS X, however, the interpretation of the filenames as UTF-8 is part of the filesystem. It will only use the normalized version, even when you use the unnormalized in a system call. So you can't have both in the filesystem. However, Emacs only uses the unnormalized version when you enter characters in the normal way, and therefore the completion fails. For it to succeed Emacs would have to do the normalization first (there are OS functions for this. >NS> Emacs must also be doing some normalization... switch-to-buffer >NS> completion works on "rückerstattung" after all. Only `read-file-name' >NS> doesn't. Hmm, maybe this /is/ an Emacs bug after all. No, it doesn't do normalization. For buffers it is the same as for filenames. But usually you don't have normalized buffer names (except for those where normalized is the same as unnormalized of course). When you create a file with name rückerstattung on OS X and open it from a directory listing (where it shows as rückerstattung) you get a buffer name rückerstattung. This will not complete from rü. -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: piet@vanoostrum.org