str.decode
decode([encoding[, errors]])
Decodes the string using the codec registered for encoding. encoding
defaults to the default string encoding. errors may be given to set a
different error handling scheme. The default is 'strict', meaning
that encoding errors raise UnicodeError. Other possible values are
'ignore', 'replace' and any other name registered via
codecs.register_error, see section [3.8.1][14]. New in version
2.2. Changed in version 2.3: Support for other error handling schemes
added.
Comment:
Pass the STRING 'strict' or 'ignore', like this: str = str.decode( "utf-8","ignore")
Posted by andrew stone (2007-05-01)