Re: [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces
30 Apr
2009
30 Apr
'09
6:02 p.m.
One further question: should the encoder accept a string like u'\xDCC2\xDC80'? That would encode to b'\xC2\x80', which, when decoded, would give u'\x80'. Does the PEP only guarantee that strings decoded from the filesystem are reversible, but not check what might be de novo strings?
30 Apr
30 Apr
7:10 p.m.
New subject: PEP 383: Non-decodable Bytes in System Character Interfaces
MRAB wrote:
One further question: should the encoder accept a string like u'\xDCC2\xDC80'? That would encode to b'\xC2\x80'
Indeed so.
which, when decoded, would give u'\x80'.
Assuming the encoding is UTF-8, yes.
Does the PEP only guarantee that strings decoded from the filesystem are reversible, but not check what might be de novo strings?
Exactly so. Regards, Martin
5474
Age (days ago)
5474
Last active (days ago)
1 comments
2 participants
participants (2)
-
"Martin v. Löwis"
-
MRAB