Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68071 > unrolled thread
| Started by | Jun Tanaka <tnajun@gmail.com> |
|---|---|
| First post | 2014-03-09 16:52 +0900 |
| Last post | 2014-03-09 16:52 +0900 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
process.popen with Japanese args => UTF8 JAVA Jun Tanaka <tnajun@gmail.com> - 2014-03-09 16:52 +0900
| From | Jun Tanaka <tnajun@gmail.com> |
|---|---|
| Date | 2014-03-09 16:52 +0900 |
| Subject | process.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>>>>>>>>>>>>>>>>>>>>>>
Back to top | Article view | comp.lang.python
csiph-web