emacs-devel
[Top][All Lists]
Advanced

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

Re: Multibyte and unibyte file names


From: Eli Zaretskii
Subject: Re: Multibyte and unibyte file names
Date: Thu, 24 Jan 2013 18:40:07 +0200

> From: Michael Albinus <address@hidden>
> Cc: address@hidden,  Kazuhiro Ito <address@hidden>
> Date: Thu, 24 Jan 2013 11:00:23 +0100
> 
> Eli Zaretskii <address@hidden> writes:
> 
> >     which on Windows means that, e.g.
> >
> >       (let ((file-name-coding-system 'cp1252))
> >     (file-name-directory "/address@hidden:漢字/"))
> >
> >        => "/address@hidden:  /"
> >
> >    And there are other similar handlers in Tramp (e.g., the
> >    file-name-nondirectory handler) which do the same.  IOW, they seem
> >    to _assume_ that the corresponding "real" handler never needs to
> >    encode the file name.  A false assumption.
> 
> I've just committed a patch to the trunk, which checks in
> `tramp-tramp-file-p', whether file names are unibyte strings. If they
> aren't, Tramp ceases to work. That's the best I can do for the moment.

I think this is wrong.  It means only pure-ASCII file names will be
supported by Tramp, which is too drastic and unjustified.

If you did that to resolve the problem with the above snippet, then
IMO the right solution for that is to write file-name-directory
handler in Lisp, instead of calling the built-in primitive, which has
the adverse side effect on Windows.




reply via email to

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