Printing accented characters in Python 2.7 -
i'm new python. i'm trying print accented characters, this:
# -*- coding: utf-8 -*- print 'éàÇÃãéèï'
but when execute code, get:
>> ├®├á├ç├â├ú├®├¿├»
i'm using 64-bit windows 7 & python 2.7.5, have code in file.py
, execute with
python file.py
as wooble mentioned, if change
print 'éàÇÃãéèï'
to
print u'éàÇÃãéèï'
it should work.
here intro unicode in python (both 2.x , 3): the updated guide unicode
Comments
Post a Comment