4
I'm running a Java program on Mac OS X 10.8 (from the Terminal), and the Java VM's file.encoding
is defaulting to "SJIS". I even tried a tiny Java program that does nothing but print out the system properties, and that shows that the Java VM itself is defaulting to SJIS. (And let's face it, nobody likes SJIS!)
My terminal is set to UTF-8. My $LANG isn't set, and $LC_CTYPE is "UTF-8". No environmental variable or Terminal setting has "JIS" in it anywhere, AFAICT.
On Java on Mac OS X, where does it get the file.encoding
value from? Is there a system setting I can change so that it uses UTF-8? I don't want to have to specify this per-application and per-library, because that is somewhere between "awkward" and "impossible", depending on the program.
I suppose I'm OK with setting an environmental variable for this, but I can't find any standard variables (like $LANG) that affect Java.
Please quote the relevant information from your link – Ramhound – 2016-07-10T00:08:10.250