On Solaris 2.6 with ja_JP.PCK locale,
System.getProperty() can't get the property named by Shift-JIS characters from command line.
Please compile following program.
And run commands below.
%echo "Expect: Š¿Žš‚Ü‚´‚è123"
%java -Dmy.prop=Š¿Žš‚Ü‚´‚è123 SysProp my.prop
%echo "Expect: Š¿Žš‚Ü‚´‚è123"
%java -DŠ¿Žšprop=Š¿Žš‚Ü‚´‚è123 SysProp Š¿Žšprop
Shift-JIS property name is not recognized.
====== SysProp.java =============================================================
public class SysProp {
public static void main(String args[]) {
System.out.println(System.getProperty(args[0]));
}
}
=================================================================================
System.getProperty() can't get the property named by Shift-JIS characters from command line.
Please compile following program.
And run commands below.
%echo "Expect: Š¿Žš‚Ü‚´‚è123"
%java -Dmy.prop=Š¿Žš‚Ü‚´‚è123 SysProp my.prop
%echo "Expect: Š¿Žš‚Ü‚´‚è123"
%java -DŠ¿Žšprop=Š¿Žš‚Ü‚´‚è123 SysProp Š¿Žšprop
Shift-JIS property name is not recognized.
====== SysProp.java =============================================================
public class SysProp {
public static void main(String args[]) {
System.out.println(System.getProperty(args[0]));
}
}
=================================================================================
- duplicates
-
JDK-4229908 Java interpreter can't get some character encoding as command line arguments.
- Closed