[Python-3000] [Python-Dev] Filename as byte string in python 2.6 or 3.0?
Terry Reedy
tjreedy at udel.edu
Fri Oct 10 04:20:02 CEST 2008
Glenn Linderman wrote:
> My understanding of the Posix file names is that any byte values are
> valid except "/" and null. Is this a correct understanding?
>
> The UTF-8b proposal seems to translate from a non-UTF-8 byte stream to a
> Unicode character stream. Call the original byte stream FOO. The
> transformation then produces FOOTR, a set of Unicode code points. Now
> FOOTR has a representation in UTF-8, which is a byte stream, call that
> byte stream FOOTRUTF8. How, by looking at FOOTR, do you know whether it
> represents the file name FOO or FOOTRUTF8 ? And remember that the user
> might provide a Unicode character stream identical to FOOTR: should it
> be translated to FOO or FOOTRUTF8 when creating a new file according to
> the user-supplied name?
If FOOTR is using PUA chars, then I believe that users should not be
providing such a stream as it would have no defined meaning coming from
them.
More information about the Python-3000
mailing list