title: How to pass unicode VM arguments with eclipse?
body: <p>I'm not able to read unicode strings passed as VM arguments, if I launch the process from Eclipse IDE.</p>
  
  <p>For example:</p>
  
  <pre><code>ArrayList&lt;String&gt; commands = new ArrayList&lt;&gt;();
  commands.add("java");
  commands.add("-classpath");
  commands.add("bin");
  commands.add("-Dprop=ÁÉÍÓÚ");
  commands.add("test.ReadProp");
  ProcessBuilder pb = new ProcessBuilder(commands);
  Process process = pb.start();
  BufferedReader in;
  String line;
  in = new BufferedReader(new InputStreamReader(process.getInputStream()));
  while ((line = in.readLine()) != null)
      System.out.println(line);
  </code></pre>
  
  <p>With <em>test.ReadProp</em></p>
  
  <pre><code>String prop = System.getProperty("prop");
  System.out.println("prop: " + prop);
  </code></pre>
  
  <p>The result is</p>
  
  <pre><code>prop: ??????????
  </code></pre>
  
  <p>The only solution seems to force the environment variable <code>LANG</code> in this way</p>
  
  <pre><code>pb.environment().put("LANG", "it_IT.UTF-8");
  </code></pre>
  
  <p>There are better solutions?
  More portable?</p>
  
  <h2>Updated at 20:30</h2>
  
  <p>Another solution seems to be adding the environment <code>LANG=it_IT.UTF-8</code> to the BASH script that launches the Eclipse process. But it is not something that I can control on every computer.</p>