+ 3
how to ouput Chinese?
sololearn python3.5
10 Antworten
+ 4
" The problem is was (see Python 3.6 update below) with the Windows console, which supports an ANSI character set appropriate for the region targeted by your version of Windows. Python throws an exception by default when unsupported characters are output. "
check if this helps you. let us know if you were successful in output of Japanese characters in the Console.
full info: https://stackoverflow.com/questions/30539882/whats-the-deal-with-python-3-4-unicode-different-languages-and-windows
https://code.sololearn.com/cX52Pq1RDApb/?ref=app
+ 1
texts ‘Chinese’
puts text
output :chinese
0
print("中文")
it will error
0
UnicodeEncodeError: 'charmap' codec can't encod
0
I still can't output 中文
0
can you give the correct code?
thanks
0
have you solved the problem?
it could be your default coding is not UTF-8
https://www.python.org/dev/peps/pep-0263/