On 2 November 2011 10:03, Jean-Marie Gaillourdet <j...@gaillourdet.net> wrote: > 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 _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users