Michael Heemskerk avatar Michael Heemskerk committed d2b42b8

CRUC-4793: Fix for JVM bug with unicode cmdline arguments

Comments (0)

Files changed (2)


       * are larger. The OEM code page is typically used for console applications, whereas the windows code pages are used for native non-Unicode application
       * using a GUI on Windows systems.  The system-wide settings can be found in the windows registry:
-      * - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP defines which OEM code page is used
-      * - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP defines which ANSI code page is used
       * More info about the history of OEM vs ANSI code pages: http://blogs.msdn.com/b/michkap/archive/2005/02/08/369197.aspx
         String[] i18n = new String[cmdArray.length + extraArgs];
         i18n[0] = "cmd";
         i18n[1] = "/C";
+//        i18n[2] = "chcp 65001";
+//        i18n[3] = "&&";
         i18n[extraArgs] = cmdArray[0];
         for (int counter = 1; counter < cmdArray.length; counter++) {
             String envName = "JENV_" + counter;
                         processException = new ProcessException(e);
-                boolean done = true;


 	 * @param args
 	public static void main(String[] args) {
+		System.err.println("Encoding " + System.getProperty("file.encoding"));
 		String sep = "";
 		for (String str : args) {
 			System.out.println(sep + str);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.