
2 Nov
2011
2 Nov
'11
9:29 a.m.
On 2 November 2011 10:03, Jean-Marie Gaillourdet
As far as I know, not all encodings are reversable. I.e. there are byte sequences which are invalid utf-8. Therefore, decoding and re-encoding might not return the exact same byte sequence.
The PEP 383 mechanism explicitly recognises this fact and defines a reversible way of decoding bytes into strings. The new behaviour is guaranteed to be reversible except for certain private use codepoints (0xEF00 to 0xEFFF inclusive) which: 1. We do not expect to see in practice 2. Are unofficially standardised for use with this sort of "encoding hack" Max