> i stumbled on this situation, that is if I decode some string, below
> just the empty string, using the mcbs encoding, it succeeds, but if I
> try to encode it back with the same encoding it surprisingly fails
> with a LookupError. This seems like something to be corrected?
Indeed - in your code. It's not the same encoding.
>>>> unicode(s, 'mcbs')
> u''
>>>> unicode(s, 'mcbs').encode('mcbs')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> LookupError: unknown encoding: mcbs
Use "mbcs" in the second call, not "mcbs".
HTH,
Martin
--
http://mail.python.org/mailman/listinfo/python-list