Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Sat, 23 Apr 2022 05:53:17 GMT, David Holmes wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified the spec for the new system properties. > > src/java.base/share/classes/java/lang/System.java line 774: > >> 772: * Character encoding name for {@link System#out >> System.out}. >> 773: * The Java runtime can be started with the system property set >> to {@code UTF-8}, >> 774: * starting it with the property set to another value clears to >> undefined behavior. > > _leads_ to undefined behavior Good catch! Fixed. - PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v3]
> Promoting the internal system properties for `System.out` and `System.err` so > that users can override the encoding used for those streams to `UTF-8`, > aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Fixed typos. - Changes: - all: https://git.openjdk.java.net/jdk/pull/8270/files - new: https://git.openjdk.java.net/jdk/pull/8270/files/b5bcb870..a91fd9ca Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8270=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8270=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8270.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8270/head:pull/8270 PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Fri, 22 Apr 2022 18:14:18 GMT, Naoto Sato wrote: >> Promoting the internal system properties for `System.out` and `System.err` >> so that users can override the encoding used for those streams to `UTF-8`, >> aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Modified the spec for the new system properties. Overall I think this looks good, assuming the typo in the spec ("clears" -> "leads") is fixed. - Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Sat, 23 Apr 2022 05:55:15 GMT, David Holmes wrote: > I think Alan has a typo: "clears" -> "leads" Apologies, there was a typo in my comment on the PR. I didn't mean for the word "clears" to go into the spec. - PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Fri, 22 Apr 2022 18:10:27 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/lang/System.java line 780: >> >>> 778: * The property may be set on the command line to the value >>> 779: * {@code UTF-8}. Setting the property to a value other than >>> {@code UTF-8} >>> 780: * leads to unspecified behavior. >> >> I think the proposal to introduce two standard properties is good and is >> consistent with the recently introduced native.encoding. I'm not 100% sure >> that the sentence "The property may be set on the command line ..." is >> appropriate for the spec of standard properties. We got away with that for >> file.encoding in implNote but that isn't spec. I think we may have to >> replace this with something that says that the Java runtime can be started >> with the system property set to "UTF-8", starting it with the property set >> to another value clears to undefined behavior. > > Thanks, Alan. Modified them as suggested. I think Alan has a typo: "clears" -> "leads" - PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Fri, 22 Apr 2022 18:14:18 GMT, Naoto Sato wrote: >> Promoting the internal system properties for `System.out` and `System.err` >> so that users can override the encoding used for those streams to `UTF-8`, >> aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Modified the spec for the new system properties. src/java.base/share/classes/java/lang/System.java line 774: > 772: * Character encoding name for {@link System#out System.out}. > 773: * The Java runtime can be started with the system property set > to {@code UTF-8}, > 774: * starting it with the property set to another value clears to > undefined behavior. _leads_ to undefined behavior - PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
> Promoting the internal system properties for `System.out` and `System.err` so > that users can override the encoding used for those streams to `UTF-8`, > aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Modified the spec for the new system properties. - Changes: - all: https://git.openjdk.java.net/jdk/pull/8270/files - new: https://git.openjdk.java.net/jdk/pull/8270/files/9ef42917..b5bcb870 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=8270=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8270=00-01 Stats: 6 lines in 1 file changed: 0 ins; 2 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8270.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8270/head:pull/8270 PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc [v2]
On Fri, 22 Apr 2022 09:31:19 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Modified the spec for the new system properties. > > src/java.base/share/classes/java/lang/System.java line 780: > >> 778: * The property may be set on the command line to the value >> 779: * {@code UTF-8}. Setting the property to a value other than >> {@code UTF-8} >> 780: * leads to unspecified behavior. > > I think the proposal to introduce two standard properties is good and is > consistent with the recently introduced native.encoding. I'm not 100% sure > that the sentence "The property may be set on the command line ..." is > appropriate for the spec of standard properties. We got away with that for > file.encoding in implNote but that isn't spec. I think we may have to replace > this with something that says that the Java runtime can be started with the > system property set to "UTF-8", starting it with the property set to another > value clears to undefined behavior. Thanks, Alan. Modified them as suggested. - PR: https://git.openjdk.java.net/jdk/pull/8270
Re: RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc
On Fri, 15 Apr 2022 20:26:55 GMT, Naoto Sato wrote: > Promoting the internal system properties for `System.out` and `System.err` so > that users can override the encoding used for those streams to `UTF-8`, > aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. src/java.base/share/classes/java/lang/System.java line 780: > 778: * The property may be set on the command line to the value > 779: * {@code UTF-8}. Setting the property to a value other than > {@code UTF-8} > 780: * leads to unspecified behavior. I think the proposal to introduce two standard properties is good and is consistent with the recently introduced native.encoding. I'm not 100% sure that the sentence "The property may be set on the command line ..." is appropriate for the spec of standard properties. We got away with that for file.encoding in implNote but that isn't spec. I think we may have to replace this with something that says that the Java runtime can be started with the system property set to "UTF-8", starting it with the property set to another value clears to undefined behavior. - PR: https://git.openjdk.java.net/jdk/pull/8270
RFR: 8283620: System.out does not use the encoding/charset specified in the Javadoc
Promoting the internal system properties for `System.out` and `System.err` so that users can override the encoding used for those streams to `UTF-8`, aligning to the `Charset.defaultCharset()`. A CSR has also been drafted. - Commit messages: - 8283620: System.out does not use the encoding/charset specified in the Javadoc Changes: https://git.openjdk.java.net/jdk/pull/8270/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8270=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8283620 Stats: 57 lines in 8 files changed: 24 ins; 4 del; 29 mod Patch: https://git.openjdk.java.net/jdk/pull/8270.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8270/head:pull/8270 PR: https://git.openjdk.java.net/jdk/pull/8270