[Top][All Lists]

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

Re: [bug-gnulib] Re: ISSLASH on Woe32

From: Stepan Kasal
Subject: Re: [bug-gnulib] Re: ISSLASH on Woe32
Date: Thu, 28 Apr 2005 12:30:31 +0200
User-agent: Mutt/1.4.1i


Ian Abbott asked:
> > Could this also be a problem on Unix systems using multibyte encoded
> > (UTF-8) filesystems, if not now then in the future?

no, this cannot happen, because of how UTF-8 is designed:

1) If a character is represented by a single byte, then the the most
significant bit is not set, and the byte is the same as in ASCII.
In other words, the 7bit ASCII is part of UTF-8.

2) If a character is represented by a sequence of bytes, then each of these
bytes has the most significant bit set.  (Thus no '/' can appear there.)

[I'd like to thank to Jakub Jelinek for teaching me this.]

Paul said:
> I doubt it.  Historically Unix has always used bytes, not characters,
> to name files.  So it doesn't care about your encoding.  I doubt
> whether this will ever change.

Paul, your intuition was right.  Actually, using utf-8 for filenames
prevents this problem in principle.

Have a nice day,

reply via email to

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