Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68071 > unrolled thread

process.popen with Japanese args => UTF8 JAVA

Started byJun Tanaka <tnajun@gmail.com>
First post2014-03-09 16:52 +0900
Last post2014-03-09 16:52 +0900
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  process.popen with Japanese args => UTF8 JAVA Jun Tanaka <tnajun@gmail.com> - 2014-03-09 16:52 +0900

#68071 — process.popen with Japanese args => UTF8 JAVA

FromJun Tanaka <tnajun@gmail.com>
Date2014-03-09 16:52 +0900
Subjectprocess.popen with Japanese args => UTF8 JAVA
Message-ID<mailman.7950.1394351586.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

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>>>>>>>>>>>>>>>>>>>>>>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web