On Fri, Feb 18, 2011 at 11:40 AM, tom z wrote:
> Hi all~
> My script can't work.I've changed my defaultencoding from 'ascii' to
> 'utf-8',but Python also raises a 'UnicodeEncodeError' error.
>
> the error likes this:
>
> >>> s=u'La Pe\xf1a'
> >>>print s
> UnicodeEncodeError: 'ascii' codec can't e
Hi all~
My script can't work.I've changed my defaultencoding from 'ascii' to
'utf-8',but Python also raises a 'UnicodeEncodeError' error.
the error likes this:
>>> s=u'La Pe\xf1a'
>>>print s
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position
5: ...
And in my script, the