This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2011-02-10.12:38:41
SpamBayes Score 7.260109e-11
Marked as misclassified No
Message-id <1297341526.6.0.0854316308475.issue11169@psf.upfronthosting.co.za>
In-reply-to
Content
The compileall uses print("bla", filename, "bla") to write messages to the console. But the print fails if the filename cannot be encoded to the console encoding. It occurs if the filename is an undecodable filename encoded by the PEP 383 using surrogates. For example, UTF-8 cannot encode surrogates.

Attached patch uses repr() to escape surrogates: it adds also quotes to the filename. I don't know if it is a problem to add quotes. I prefer quotes, but it is more readable if the path or the filename contain spaces.
History
Date User Action Args
2011-02-10 12:38:46vstinnersetrecipients: + vstinner
2011-02-10 12:38:46vstinnersetmessageid: <1297341526.6.0.0854316308475.issue11169@psf.upfronthosting.co.za>
2011-02-10 12:38:42vstinnerlinkissue11169 messages
2011-02-10 12:38:42vstinnercreate