Runtime.getRuntime.exec + Czech windows

I

ilya

I am working on Czech windows and have the problem with the executing
the commands with Runtime.getRuntime().exec(). The special czech
characters are changed during the executing the command.

For example, the file c:\applications\commands\testí\run.bat will not
be executed because the character " í " will be changed on some
character or on ?.

Is there the way to execute the command?
 
M

markspace

I am working on Czech windows and have the problem with the executing
the commands with Runtime.getRuntime().exec(). The special czech
characters are changed during the executing the command.

For example, the file c:\applications\commands\testí\run.bat will not
be executed because the character " í " will be changed on some
character or on ?.

Is there the way to execute the command?


<http://download.oracle.com/javase/6/docs/api/java/nio/charset/CharsetDecoder.html>

What is the actual Unicode code point (the number) for the í character?
 
R

Roedy Green

For example, the file c:\applications\commands\test=ED\run.bat will not
be executed because the character " =ED " will be changed on some
character or on ?.

If you wrote a program like this and execed it

public static void main ( String args[] )
{
for ( String arg: args )
{
out.println ( arg );
}
}

There are two places chars could potentially get scrambled -- coming
in on the command line and going out to the console. Consoles use
IBMOEM charset which is pretty well guaranteed to screw things up.
see http://mindprod.com/jgloss/encoding.html

A way to tackle this is to write a dummy program that you spawn. All
it does it dump out the chars from the command line in hex. That way
you can figure out where the chars are getting scrambled.
--
Roedy Green Canadian Mind Products
http://mindprod.com
It should not be considered an error when the user starts something
already started or stops something already stopped. This applies
to browsers, services, editors... It is inexcusable to
punish the user by requiring some elaborate sequence to atone,
e.g. open the task editor, find and kill some processes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top