System properties

Andrew Thompson lordpixel at me.com
Sat May 26 15:56:15 PDT 2012


On May 26, 2012, at 6:17 PM, Michael Hall wrote:

> 
> On May 26, 2012, at 9:34 AM, Andrew Thompson wrote:
> 
>> Honestly, I think we probably are at a point where this change makes sense. More than a decade has passed. But at the very least it should *never* *ever* be US ASCII in any shipping build (which would be going backwards from MacRoman) and it really *should* be in the release notes, because this is not a small change, though it is a subtle one. Its fair to make an explicit choice to do this, its not a good idea to do it by accident.
> 
> Not sure why you're cross-posting back to java-dev. Hasn't been MRJ for a while has it?

Well, yes, I have been around for a while. I never updated the local name for the java-dev mailing list. To be honest I was hoping Mike Swingler might confirm or correct what I had to say.

Speaking of which, I realized I didn't read your original post closely enough.  Running this

    public static void main(String[] args) {
        System.out.println(Charset.defaultCharset());
        Properties p = System.getProperties();
        for (Object key : p.keySet()) {
            if ( key.toString().contains(".io") || key.toString().contains("file") || key.toString().contains("encoding")) {
                System.out.println(key + ": " + p.get(key));
            }
        }
    }


On Apple's Java 6 on a US system yields

file.encoding.pkg: sun.io
java.io.tmpdir: /var/folders/7m/7mim+FSkH-OUDOW+xuAhk++++TM/-Tmp-/
sun.jnu.encoding: MacRoman
file.encoding: UTF-8
file.separator: /
sun.io.unicode.encoding: UnicodeLittle

I had been assuming you were referring to file.encoding changing from MacRoman to UTF-8, but clearly it has been UTF-8 for a while.
Googling around sun.jnu.encoding ... it turns out to be an undocumented property that influences things like parsing the command line.
Clearly a much less important thing to change. Basically, nothing to see here. Apologies for all the noise.

AndyT
 


More information about the macosx-port-dev mailing list