[Python-ideas] Fix default encodings on Windows

eryk sun eryksun at gmail.com
Thu Aug 18 15:12:08 EDT 2016


On Thu, Aug 18, 2016 at 4:44 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, Aug 19, 2016 at 2:39 AM, eryk sun <eryksun at gmail.com> wrote:
>> They're all just characters in the context of Unicode, so I think it's
>> clearest to use the character code, e.g.:
>>
>>     The second call to glob has replaced the U+AB00 character with '?',
>>     which means ...
>
> Technically the character has been replaced with the byte value 63,
> although at this point, we're getting into dangerous areas of bytes
> being interpreted in one way or another.

Windows NLS codepages are all supersets of ASCII (no EBCDIC to worry
about), and the default character when encoding is always b"?". The
default Unicode character when decoding is also almost always "?",
except Japanese uses U+30FB.


More information about the Python-ideas mailing list