bug of python
http://bugs.python.org/issue1759845
解决:
print sys.stdout.encoding #eg : it shows cp936
info = u'汉字'
cmd = 'echo ' + info
subprocess.call(["java", "-jar", "Test.jar", cmd.encode('cp936')], shell=True)
2022-10-26 20:57:25
bug of python
http://bugs.python.org/issue1759845
解决:
print sys.stdout.encoding #eg : it shows cp936
info = u'汉字'
cmd = 'echo ' + info
subprocess.call(["java", "-jar", "Test.jar", cmd.encode('cp936')], shell=True)