[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ISO-8859-1 encoded file names and UTF-8

From: Karl Eichwalder
Subject: Re: ISO-8859-1 encoded file names and UTF-8
Date: Wed, 19 Mar 2003 17:15:42 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux)

Kenichi Handa <address@hidden> writes:

> I'm sorry for the late response.  Before providing a solution, I had
> to fix some fundamental problems about filename handling.

Yes, I already saw you working on stuff like that the last days; thanks
a lot!

>> Now go to a file name with umlauts and press 'f' to visit the file:
>> Debugger entered--Lisp error: (error "File no longer exists; type `g' to 
>> update Dired buffer")
> This problem should be fixed now in HEAD.  Please try again after
> updating from CVS.

I think there is still a subtle bug left; in a ISO-8859-1 locale do:

touch "Maler Müller"

Then call emacs:

LANG=de_DE.UTF-8 emacs -q --no-site --no-splash .

In dired you can see:

  -rw-r--r--  1 ke  users   0 2003-03-19 16:10 Maler M\374ller\374rle
                                     good part ^^^^^^^^^^^^^^^|||||||
                              trailing garbage ------------>>>^^^^^^^

There is trailing garbage (otherwise the escape sequence is okay for

> Anyway, how about the attached function for changing the encoding of a
> filename.  I have not yet installed it because I have not yet found an
> answer to this question.

The function works for me.

> Should the recoding of filename regarded as a kind of file name
> changing?  If so, perhaps we should make the function rename-file to
> handle also recoding.   In that case, how should we tell rename-file
> to actually recode filename encoding?

If the user calls rename-file it should be up to him to specify a proper
file name.  In other words I vote to provide a separate function like
convert-file-name to do the right thing; by default convert-file-name
should try to convert the file name to the user's locale.

Hope this helps.

address@hidden (work) / address@hidden (home):              |
http://www.gnu.franken.de/ke/                            |      ,__o
Free Translation Project:                                |    _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/             |   (*)/'(*)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]