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: Stephen J. Turnbull
Subject: Re: Multibyte and unibyte file names
Date: Sun, 27 Jan 2013 03:30:27 +0900

Paul Eggert writes:

 > encoded in Shift-JIS or Big5.  Moreover, a file name is
 > safe even if it has some parts encoded in Shift-JIS
 > and other parts encoded in Big5, so that it looks like
 > gibberish on the screen.  That is because none of these
 > encoding usurp '/' or '.'.

They do however usurp '\', which has meaning in regexps and to shells,
as well as some other characters that have meaning in those contexts.
So you're OK as long as the filename is passed directly to the kernel,
but not if it's used in many other external contexts.

It also may imply that some unibyte strings cannot be correctly
regexp-quoted when used in Emacs (because some of the backslashes
arise from encoded characters in file names, and others were
introduced by the user via regexp constructs).

So it's not so easy to escape by noting that POSIX file names as such
are safe.




reply via email to

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