Jump to content
Sign in to follow this  

Issue with unicode characters

Recommended Posts


I am passing unicode character from java to autoIt script as :

String filePath = "E:\\ravi\\腿哦哦予以.ppt";
String exeFile = "SingleFileUpload.exe";  //autoIt script
dialog =  new String[]{ exeFile,"ie",filePath };

But when i access filePath parameter from autoIt script, i am getting as ???? instead of correct value of parameter.

MsgBox(0, "File Path:", $CmdLine[2])
ControlSetText($title,"","Edit1", $CmdLine[2])

Getting E:\ravi\????.ppt as value of $CmdLine[2] which is filePath



Edited by RaviJ

Share this post

Link to post
Share on other sites

Hi Ravi,

Just go through this page http://www.scintilla.org/SciTEDoc.html and you will find some settings which will do the work.

I have done some settings change and looks like things are getting done.

Thank you,


Share this post

Link to post
Share on other sites

Exactly the same issue as yours in a Java bug report: http://bugs.sun.com/view_bug.do?bug_id=4947220

From that page:

Here's the source for the workaround as mentioned by sdaw:

String[] cmd = new String[]{"yourcmd.exe","Japanese CLI argument: \ufeff\u30cb\u30e5\u30fc\u30b9"};     
    Map<String, String> newEnv = new HashMap<String, String>();
    String[] i18n = new String[cmd.length + 2];
    i18n[0] = "cmd";
    i18n[1] = "/C";
    i18n[2] = cmd[0];
    for (int counter = 1; counter < cmd.length; counter++)
        String envName = "JENV_" + counter;
        i18n[counter + 2] = "%" + envName + "%";
        newEnv.put(envName, cmd[counter]);
    cmd = i18n;

    ProcessBuilder pb = new ProcessBuilder(cmd);
    Map<String, String> env = pb.environment();
    final Process p = pb.start();

Edited by Manadar

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...