Running programs with japanese (or whatever, I guess) arguments in a windows console
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Simon_Gornall
Posted On:   Friday, March 14, 2003 06:33 AM

I want to start up a Java program as a service (so I can't just use chcp in a batch file before running the program), and have it execute text-mode programs on a fairly regular basis. This all works well under normal circumstances, but when run on a Japanese windows box, I'm not getting the command-string through Runtime.exec() without them being mangled :-( The program works fine if run inside a DOS window after "chcp 932", and fine when invoked with no japanese arguments, but in codepage 432 (the default, in the DOS box on the japanese PC !) the filenames are all mangled :-( I've tried setting file.encoding both on the commandline, and in the program, and neither make any difference.    More>>

I want to start up a Java program as a service (so I can't just use chcp in a batch file before running the program), and have it execute text-mode programs on a fairly regular basis.


This all works well under normal circumstances, but when run on a Japanese windows box, I'm not getting the command-string through Runtime.exec() without them being mangled :-(


The program works fine if run inside a DOS window after "chcp 932", and fine when invoked with no japanese arguments, but in codepage 432 (the default, in the DOS box on the japanese PC !) the filenames are all mangled :-(


I've tried setting file.encoding both on the commandline, and in the program, and neither make any difference.


Is there any way to force a given codepage when running a console application ?


Tx in advance for any help :-))


Simon

   <<Less

Re: Running programs with japanese (or whatever, I guess) arguments in a windows console

Posted By:   eimi_nos  
Posted On:   Friday, March 14, 2003 09:51 PM

About | Sitemap | Contact