[Python-3000] New proposition for Python3 bytes filename issue

Antoine Pitrou solipsis at pitrou.net
Tue Sep 30 11:28:03 CEST 2008


Adam Olsen <rhamph <at> gmail.com> writes:
> 
> The only way to display that file would be to transform it into some
> other valid unicode string.  However, as that string is already valid,
> you've just made any files named after it impossible to open.

Not if those valid sequences are also properly escaped to avoid collisions.
That's what utf-8b claims to do.

My view of utf-8b is that if is not really  a new codec, but an escaping phase
added in front of utf-8, such that illegal byte sequences get converted to legal
byte sequences. This is how e.g. XML-escaping works ("&" -> "&amp;", etc.). The
only difficulty being in choosing sufficiently rare escaping sequences, so that
readability is not impacted.




More information about the Python-3000 mailing list