different encodings for unicode() and u''.encode(), bug?

mario mario at ruggier.org
Wed Jan 2 09:45:15 CET 2008


On Jan 2, 9:30 am, "Martin v. Löwis" <mar... at v.loewis.de> wrote:

> Use "mbcs" in the second call, not "mcbs".

Ooops, sorry about that, when i switched to test it in the interpreter
I mistyped "mbcs" with "mcbs". But remark I did it consistently ;-)
I.e. it was still teh same encoding, even if maybe non-existant.. ?

If I try again using "mbcs" consistently, I still get the same error:


$ python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> unicode('', 'mbcs')
u''
>>> unicode('', 'mbcs').encode('mbcs')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
LookupError: unknown encoding: mbcs
>>>

mario



More information about the Python-list mailing list