[Python-Dev] a suggestion ... Re: PEP 383 (again)
Michael Urman
murman at gmail.com
Thu Apr 30 17:43:02 CEST 2009
On Thu, Apr 30, 2009 at 09:42, Thomas Breuel <tmbdev at gmail.com> wrote:
> So, I don't see any reason to prefer your half surrogate quoting to the Mono
> U+0000-based quoting. Both seem to achieve the same goal with respect to
> round tripping file names, displaying them, etc., but Mono quoting actually
> results in valid unicode strings. It works because null is the one
> character that's not legal in a UNIX path name.
This seems to summarize only half of the problem. Mono's U+0000
quoting creates a string which is an invalid filename; PEP 383's
creates one which is an unsanctioned collection of code units. Neither
can be passed directly to the posix filesystem in question. I favor
PEP 383 because its Unicode strings can be usefully passed to most
APIs that would display it usefully. Mono's U+0000 probably truncates
most strings. And since such non-valid Unicode strings can occur on
the Windows filesystem, I don't find their use in PEP 383 to be a
flaw.
--
Michael Urman
More information about the Python-Dev
mailing list