Message202335
| 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. |
|