I have a python script that prints chinese output on command line. It works fine in eclipse. However, when I run it in dos window, it prints ? (question marks) and garbage characters. Could it be because of big-5 vs gb encoding? if so, how do I control it?
btw, I already installed the Asian character sets, which is why it works in Eclipse
edit:combining chcp, encode('utf-8'), and setting the non-unicode handler, I can now see the character, but a simple print results in a exception:
chcp 65001
Active code page: 65001
Z:\src>c:\Python27\python.exe mobTest.py
Traceback (most recent call last):
File "mobTest.py", line 94, in <module>
print u'哈哈'.encode('utf-8')
IOError: [Errno 13] Permission denied