LWN.net Logo

Moving to Python 3

Moving to Python 3

Posted Feb 12, 2011 1:50 UTC (Sat) by foom (subscriber, #14868)
In reply to: Moving to Python 3 by cmccabe
Parent article: Moving to Python 3

They don't ignore random-byte filenames. Filenames are decoded from bytes to unicode with the *locale encoding* (not always utf8), and the "surrogateescape" error handler. That allows roundtripping filenames through unicode even if they're not in the proper encoding at all (although in that case they'll be garbage).

http://www.python.org/dev/peps/pep-0383/


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds