Runtime.getRuntime.exec + Czech windows

Discussion in 'Java' started by ilya, Sep 26, 2011.

  1. ilya

    ilya Guest

    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?
     
    ilya, Sep 26, 2011
    #1
    1. Advertising

  2. ilya

    markspace Guest

    On 9/26/2011 5:40 AM, ilya wrote:
    > 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?
     
    markspace, Sep 26, 2011
    #2
    1. Advertising

  3. ilya

    Lew Guest

    markspace wrote:
    > ilya wrote:
    >> 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?


    Also, http://sscce.org/ ?

    --
    Lew
     
    Lew, Sep 26, 2011
    #3
  4. ilya

    Roedy Green Guest

    On Mon, 26 Sep 2011 05:40:43 -0700 (PDT), ilya <>
    wrote, quoted or indirectly quoted someone who said :

    >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.
     
    Roedy Green, Sep 26, 2011
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zsolt Koppany
    Replies:
    2
    Views:
    7,138
    SaintMagoo
    Mar 5, 2011
  2. MARTIN Herve \(EXT\)
    Replies:
    1
    Views:
    1,463
    Anthony Borla
    Nov 27, 2003
  3. paul brown
    Replies:
    3
    Views:
    5,566
    deepa gr
    Feb 17, 2009
  4. S!mb@
    Replies:
    3
    Views:
    7,670
    Roedy Green
    Jul 19, 2004
  5. Dave Neuendorf
    Replies:
    5
    Views:
    6,727
    Anthony Borla
    Feb 25, 2005
Loading...

Share This Page