Re: RFR: 8265989: System property for the native character encoding name [v3]

2021-05-03 Thread Roger Riggs
On Fri, 30 Apr 2021 22:10:21 GMT, Naoto Sato wrote: >> After some internal discussion, we thought it was good to expose the native >> environment's default character encoding, which Charset.defaultCharset() is >> currently based on. This way applications will have a better migration path >> af

Re: RFR: 8265989: System property for the native character encoding name [v3]

2021-05-03 Thread Iris Clark
On Fri, 30 Apr 2021 22:10:21 GMT, Naoto Sato wrote: >> After some internal discussion, we thought it was good to expose the native >> environment's default character encoding, which Charset.defaultCharset() is >> currently based on. This way applications will have a better migration path >> af

Re: RFR: 8265989: System property for the native character encoding name [v3]

2021-04-30 Thread Naoto Sato
> After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after the [JEP 400](https://openjdk.java.net/jeps/400) is im

Re: RFR: 8265989: System property for the native character encoding name [v2]

2021-04-30 Thread Naoto Sato
On Fri, 30 Apr 2021 21:09:36 GMT, Roger Riggs wrote: > To support the statement that changing the property has no effect. > Please add it to the jdk.internal.util.StaticProperties cached values and an > internal access method. Thanks. Added. - PR: https://git.openjdk.java.net/jdk/

Re: RFR: 8265989: System property for the native character encoding name [v2]

2021-04-30 Thread Naoto Sato
> After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after the [JEP 400](https://openjdk.java.net/jeps/400) is im

Re: RFR: 8265989: System property for the native character encoding name

2021-04-30 Thread Roger Riggs
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Joe Wang
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Joe Wang
On Thu, 29 Apr 2021 13:39:58 GMT, Roger Riggs wrote: >> Thanks, Joe and Iris. I agree with Iris and that's the reason I chose the >> description. System properties are inherently mutable. There are some >> "protected" ones, by that I mean a private copy is made just after >> initialization for

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Naoto Sato
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Alan Bateman
On Thu, 29 Apr 2021 14:12:29 GMT, Maurizio Cimadamore wrote: > Naive question: any reason as to why we're not providing a new static API > method in Charset to return the platform encoder? This initially will return > same thing as Charset.defaultEncoder - but as JEP 400 is delivered the two

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Maurizio Cimadamore
On Thu, 29 Apr 2021 14:08:36 GMT, Maurizio Cimadamore wrote: > Naive question: any reason as to why we're not providing a new static API > method in Charset to return the platform encoder? This initially will return > same thing as Charset.defaultEncoder - but as JEP 400 is delivered the two

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Naoto Sato
On Thu, 29 Apr 2021 13:23:42 GMT, Alan Bateman wrote: >> `native.encoding` preserves the encoding that current >> `Charset.defaultCharset()` is returning, which is based on `file.encoding`. >> So I believe the current implementation is correct. If it is biased toward >> `sun.jnu.encoding`, it

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Roger Riggs
On Thu, 29 Apr 2021 13:06:35 GMT, Naoto Sato wrote: >> I suspect that if setProperty("native.encoding", "foo") succeeds, then it >> will return "foo". I also believe that a later invocation of >> getProperty("native.encoding") will also return "foo". If that's the case, >> then I don't thin

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Alan Bateman
On Thu, 29 Apr 2021 13:11:53 GMT, Naoto Sato wrote: >> src/java.base/share/classes/jdk/internal/util/SystemProps.java line 69: >> >>> 67: ? raw.propDefault(Raw._sun_jnu_encoding_NDX) >>> 68: : raw.propDefault(Raw._file_encoding_NDX)); >>> 69: put(props, "n

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Naoto Sato
On Thu, 29 Apr 2021 07:17:26 GMT, Alan Bateman wrote: >> After some internal discussion, we thought it was good to expose the native >> environment's default character encoding, which Charset.defaultCharset() is >> currently based on. This way applications will have a better migration path >>

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Naoto Sato
On Thu, 29 Apr 2021 05:38:21 GMT, Iris Clark wrote: >> src/java.base/share/classes/java/lang/System.java line 704: >> >>> 702: * {@systemProperty native.encoding} >>> 703: * Character encoding name derived from the host >>> environment and/or >>> 704: * the user's setting

Re: RFR: 8265989: System property for the native character encoding name

2021-04-29 Thread Alan Bateman
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-28 Thread Iris Clark
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

Re: RFR: 8265989: System property for the native character encoding name

2021-04-28 Thread Iris Clark
On Thu, 29 Apr 2021 00:37:37 GMT, Joe Wang wrote: >> After some internal discussion, we thought it was good to expose the native >> environment's default character encoding, which Charset.defaultCharset() is >> currently based on. This way applications will have a better migration path >> afte

Re: RFR: 8265989: System property for the native character encoding name

2021-04-28 Thread Joe Wang
On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato wrote: > After some internal discussion, we thought it was good to expose the native > environment's default character encoding, which Charset.defaultCharset() is > currently based on. This way applications will have a better migration path > after

RFR: 8265989: System property for the native character encoding name

2021-04-28 Thread Naoto Sato
After some internal discussion, we thought it was good to expose the native environment's default character encoding, which Charset.defaultCharset() is currently based on. This way applications will have a better migration path after the [JEP 400](https://openjdk.java.net/jeps/400) is implemente