Jens Müller wrote: > I try to decode a string,e.g. > u'M\xfcnchen, pronounced [\u02c8m\u028fn\xe7\u0259n]'.decode('cp1252', > 'ignore') > but even thoug I use errors='ignore' > I get UnicodeEncodeError: 'charmap' codec can't encode character u'\u02c8' > in position 21: character maps to <undefined> > > How come?
Wrong way? Don't you want to encode the Unicode string using codepage 1252 instead? Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- http://mail.python.org/mailman/listinfo/python-list