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 serhiy.storchaka, vstinner
Date 2013-11-07.13:01:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwagnQv4dqDRJqXyYDHRFHo_bpdu4VESRwwXxCJdAsbCDQ@mail.gmail.com>
In-reply-to <1383827561.54.0.303353586467.issue19518@psf.upfronthosting.co.za>
Content
2013/11/7 Serhiy Storchaka <report@bugs.python.org>:
>> On Windows, these changes should allow to pass an unencodable filename on the command line (ex: japanese script name on an english setup).
>
> Doesn't the surrogateescape error handler solve this issue?

surrogateescape is very specific to UNIX, or more generally systems
using bytes filenames. Windows native type for filename is Unicode. To
support any Unicode filename on Windows, you must never encode a
filename.

surrogateescape avoids decoding errors, here is the problem is an
encoding error.

For example, "abé" cannot be encoded to ASCII. "abé".encode("ascii",
"surrogateescape") doesn't help here.
History
Date User Action Args
2013-11-07 13:01:19vstinnersetrecipients: + vstinner, serhiy.storchaka
2013-11-07 13:01:19vstinnerlinkissue19518 messages
2013-11-07 13:01:19vstinnercreate