> Given no UnicodeErrors, are there any cases for the following not to > be True? > > unicode(s, enc).encode(enc) == s
Certainly. ISO-2022 is famous for having ambiguous encodings. Try these: unicode("Hallo","iso-2022-jp") unicode("\x1b(BHallo","iso-2022-jp") unicode("\x1b(JHallo","iso-2022-jp") unicode("\x1b(BHal\x1b(Jlo","iso-2022-jp") or likewise unicode("[EMAIL PROTECTED]","iso-2022-jp") unicode("\x1b$BBB","iso-2022-jp") In iso-2022-jp-3, there are even more ways to encode the same string. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list