+ 3

how to ouput Chinese?

sololearn python3.5

2nd Sep 2017, 12:36 AM
吴兵
吴兵 - avatar
8 odpowiedzi
+ 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
2nd Sep 2017, 3:59 AM
Lord Krishna
Lord Krishna - avatar
+ 1
texts ‘Chinese’ puts text output :chinese
2nd Sep 2017, 1:46 AM
Naomi
Naomi - avatar
0
print("中文") it will error
2nd Sep 2017, 3:22 AM
吴兵
吴兵 - avatar
0
UnicodeEncodeError: 'charmap' codec can't encod
2nd Sep 2017, 3:26 AM
吴兵
吴兵 - avatar
2nd Sep 2017, 3:31 AM
吴兵
吴兵 - avatar
0
I still can't output 中文
2nd Sep 2017, 5:39 AM
吴兵
吴兵 - avatar
0
can you give the correct code? thanks
2nd Sep 2017, 5:51 AM
吴兵
吴兵 - avatar
0
have you solved the problem? it could be your default coding is not UTF-8 https://www.python.org/dev/peps/pep-0263/
6th Sep 2017, 8:13 AM
yuri