[UnicodeEncodeError] Don't know what else to try

Gilles Ganault nospam at nospam.com
Fri Nov 14 14:57:42 CET 2008

On Fri, 14 Nov 2008 11:01:27 +0100, "Martin v. Löwis"
<martin at v.loewis.de> wrote:
>                        print type(output)
>here. If it says "unicode", reconsider the next line
>> 			print output.decode('utf-8')

In case the string fetched from a web page turns out not to be Unicode
and Python isn't happy, what is the right way to handle this, know
what codepage is being used?

Thank you.

More information about the Python-list mailing list