On Jan 2, 7:45 pm, mario <[EMAIL PROTECTED]> wrote: > On Jan 2, 9:30 am, "Martin v. Löwis" <[EMAIL PROTECTED]> 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
Two things for you to do: (1) Try these at the Python interactive prompt: unicode('', 'latin1') unicode('', 'mbcs') unicode('', 'raboof') unicode('abc', 'latin1') unicode('abc', 'mbcs') unicode('abc', 'raboof') (2) Read what the manual (Library Reference -> codecs module -> standard encodings) has to say about mbcs. -- http://mail.python.org/mailman/listinfo/python-list