error when printing a UTF-8 string (python 2.6.2)
python at bdurham.com
python at bdurham.com
Wed Apr 21 09:05:06 EDT 2010
Hi Peter,
> Just a quick reminder: UTF-8 is not the same as unicode. Python3 works in unicode and by default uses UTF-8 to read from or write into files.
I'm not the OP, but wanted to make sure I was fully understanding your
point.
Are you saying all open() calls in Python that read text files,
automatically convert UTF-8 content to Unicode in the same manner as the
following might when using Python 2.6?
codecs.open( fileName, mode='r', encoding='UTF8', ... )
Thanks for your feedback,
Malcolm
More information about the Python-list
mailing list