RFR 8124977 cmdline encoding challenges on Windows
Anthony Vanelverdinghe
anthony.vanelverdinghe at gmail.com
Tue Jun 23 19:12:11 UTC 2015
Hi
Thanks for taking on these challenges.
I would like to be able to associate file types with a Java program [1].
Currently, the Java program doesn't receive the argument (i.e. the path
to the file that was double-clicked) correctly if it contains Unicode
characters. I assume this would be possible by specifying
-Dwindows.UnicodeConsole=true in the ftype command string, right?
I would also like for System.out and System.err to use the specified
Unicode charset. Currently, System.out and System.err use "Windows-1252"
(on my system), so they can't readily be used for Unicode output. A
quick look at the webrev suggests that this hasn't been addressed yet.
Kind regards,
Anthony
[1]
http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-May/033132.html
On 22/06/2015 23:01, Kirk Shoop (MS OPEN TECH) wrote:
> Hi,
>
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8124977
>
> Webrev:
> http://cr.openjdk.java.net/~kshoop/8124977/
>
> This webrev intends to address interaction between Windows console and java apps.
>
> Two switches were added that change the behavior of the launcher. The defaults do not change the launcher behavior.
>
> -Dwindows.UnicodeConsole=true - switches on Unicode support in the Windows console. This optional switch causes the launcher to call GetCommandLineW() and parse the arguments in unicode. It also modifies how the codepage for console output is selected.
>
> -Dfile.encoding.unicode="UTF-8" - identifies Unicode charset to use; If not specified, UTF-8 is used by default. Ignored when windows.UnicodeConsole is not set to true. When the first switch is used, this optional switch allows the codepage for console output to be controlled.
>
> I would like to get feedback on the approach here and any additional work that is required solve these particular Unicode issues on Windows.
>
> Kirk
>
More information about the core-libs-dev
mailing list