process.popen with Japanese args => UTF8 JAVA

Jun Tanaka tnajun at gmail.com
Sun Mar 9 03:52:58 EDT 2014


Hello,

I have tried to process.popen to run java program with Japanese language.
test.java is compiled with utf8
'日本語' below means Japanese in Japanese.
but it does not work. Anyone who knows this matter well. Please help.

Jun

>>>>>>>>python code>>>>>>>>>>>>>
sentence = '日本語'
filename = 'japanese'
java_file = 'test'
cmd = "java {0} {1} {2}".format(java_file, sentence, filename)
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
>>>>>>>>python code end>>>>>>>>>>>>>>>>>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140309/762b2218/attachment.html>


More information about the Python-list mailing list