Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v8]

2021-11-17 Thread Iris Clark
On Wed, 17 Nov 2021 17:48:39 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v8]

2021-11-17 Thread Alan Bateman
On Wed, 17 Nov 2021 17:48:39 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v7]

2021-11-17 Thread Naoto Sato
On Wed, 17 Nov 2021 13:02:10 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace jnuEncoding in jni_util.c with UTF-8, if platform encoding is not >> supported > > src/java.base/share/classes/s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v8]

2021-11-17 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Removed changes to Util.java as i

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v7]

2021-11-17 Thread Alan Bateman
On Mon, 15 Nov 2021 17:32:04 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v7]

2021-11-17 Thread Alan Bateman
On Mon, 15 Nov 2021 17:32:04 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-15 Thread Ichiroh Takiguchi
On Mon, 15 Nov 2021 17:28:44 GMT, Naoto Sato wrote: >> @naotoj , sorry for bothering you again. >> Still I got exception. It seems value "jnuEncoding" should be overwritten or >> set "fastEncoding" to "FAST_UTF_8" on jnu_util.c. >> Could you check this part again ? >> >> $ env LC_ALL=kk_KZ.pt15

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-15 Thread Naoto Sato
On Mon, 15 Nov 2021 02:40:14 GMT, Ichiroh Takiguchi wrote: >> I reproduced those failures on Debian Linux. Corrected the issue by >> replacing unsupported jnu encoding with `UTF-8` in `System::initPhase1`. > > @naotoj , sorry for bothering you again. > Still I got exception. It seems value "jnu

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v7]

2021-11-15 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Replace jnuEncoding in jni_util.c

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-14 Thread Ichiroh Takiguchi
On Fri, 12 Nov 2021 19:11:16 GMT, Naoto Sato wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Force the jnu encoding to UTF-8 if the original one is not supported > > I reproduced those failures on Debian Linux. Corre

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v5]

2021-11-14 Thread Alan Bateman
On Sun, 14 Nov 2021 14:41:21 GMT, Naoto Sato wrote: > Initially, I thought that was the case, but I mistook your suggestion as > setting only `notSupportedJnuEncoding` in initPhase1. Reverted the fallback > location into `initPhase1()`. np, it's always tricky to touch code that executes early

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v6]

2021-11-14 Thread Alan Bateman
On Sun, 14 Nov 2021 14:44:59 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v5]

2021-11-14 Thread Naoto Sato
On Sun, 14 Nov 2021 07:23:18 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed indentation > > src/java.base/share/classes/java/lang/System.java line 2123: > >> 2121: var jnuEncoding =

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v6]

2021-11-14 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Move UTF-8 fallback up into initP

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v5]

2021-11-13 Thread Alan Bateman
On Sun, 14 Nov 2021 02:23:03 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v5]

2021-11-13 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Fixed indentation -

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-13 Thread Naoto Sato
On Sat, 13 Nov 2021 19:24:07 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Force the jnu encoding to UTF-8 if the original one is not supported > > src/java.base/share/classes/java/lang/System.jav

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v4]

2021-11-13 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Eliminated unnecessary static fie

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-13 Thread Alan Bateman
On Fri, 12 Nov 2021 19:11:07 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-12 Thread Naoto Sato
On Fri, 12 Nov 2021 19:11:07 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v3]

2021-11-12 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Force the jnu encoding to UTF-8 i

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-11 Thread Ichiroh Takiguchi
On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-11 Thread Ichiroh Takiguchi
On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-11 Thread Alan Bateman
On Thu, 11 Nov 2021 09:40:14 GMT, Ichiroh Takiguchi wrote: > I don't have Oracle Linux... I tried to find out unsupported locales by using > following commands. I used RHEL7.9. In your previous post you used env LC_ALL=kk_KZ.pt154 java Hello.java. Would it be possible to repeat that with JDK

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-11 Thread Ichiroh Takiguchi
On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-10 Thread Naoto Sato
On Wed, 10 Nov 2021 03:31:11 GMT, Ichiroh Takiguchi wrote: >>> There may be an argument that the JDK should emit a warning at startup. >> >> Updated to emit a warning, if `sun.jnu.encoding` is not supported. > > Hello @naotoj . > I appreciate your code update. > I'd like to confirm one thing. >

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-09 Thread Alan Bateman
On Wed, 10 Nov 2021 03:31:11 GMT, Ichiroh Takiguchi wrote: > I tested your code on my CentOS7 x86_64. I saw following exception. This doesn't surprise me. It would be be useful if you could do the same experiment with main line and JDK 17 too. There have been several reports of NPE when tryin

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-09 Thread Ichiroh Takiguchi
On Tue, 9 Nov 2021 19:38:46 GMT, Naoto Sato wrote: >>> If this issue is not a part of JEP-400, I think UTF_8 may not be only >>> solution for sun/nio/fs/Util.java. >>> Please explain why UTF_8 is better than ISO_8859_1. >> >> Just to add to Naoto's comment. When the JDK starts in unusual/unsupp

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-09 Thread Iris Clark
On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-09 Thread Roger Riggs
On Tue, 9 Nov 2021 19:38:01 GMT, Naoto Sato wrote: >> Please review the subject fix. In light of JEP400, Java runtime can/should >> start in UTF-8 charset if the underlying native encoding is not supported. > > Naoto Sato has updated the pull request incrementally with one additional > commit s

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-09 Thread Naoto Sato
On Mon, 8 Nov 2021 09:44:34 GMT, Alan Bateman wrote: > There may be an argument that the JDK should emit a warning at startup. Updated to emit a warning, if `sun.jnu.encoding` is not supported. - PR: https://git.openjdk.java.net/jdk/pull/6282

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v2]

2021-11-09 Thread Naoto Sato
> Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Emit a warning on unsupported jnu

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-09 Thread Sherzod Mamadaliev
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. LGTM - Marked as reviewed by mamadal...@github.com (no known OpenJDK usernam

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-08 Thread Ichiroh Takiguchi
On Mon, 8 Nov 2021 09:44:34 GMT, Alan Bateman wrote: >> If this issue is not a part of JEP-400, I think UTF_8 may not be only >> solution for sun/nio/fs/Util.java. >> Please explain why UTF_8 is better than ISO_8859_1. > >> If this issue is not a part of JEP-400, I think UTF_8 may not be only >

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-08 Thread Alan Bateman
On Sun, 7 Nov 2021 13:03:10 GMT, Ichiroh Takiguchi wrote: > If this issue is not a part of JEP-400, I think UTF_8 may not be only > solution for sun/nio/fs/Util.java. > Please explain why UTF_8 is better than ISO_8859_1. Just to add to Naoto's comment. When the JDK starts in unusual/unsupporte

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-07 Thread Naoto Sato
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. The same rationale as JEP 400, that UTF-8 is the de-facto encoding these days. This is fo

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-07 Thread Ichiroh Takiguchi
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. If this issue is not a part of JEP-400, I think UTF_8 may not be only solution for sun/ni

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Naoto Sato
On Sat, 6 Nov 2021 17:25:39 GMT, Alan Bateman wrote: >> Thanks @AlanBateman . >> In my understanding, sun.jnu.encoding property may be related file system >> access. >> Java may not be access to appropriate file. >> I mean if the file name has malformed character, it may be changed to "?". >> In

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Alan Bateman
On Sat, 6 Nov 2021 16:59:12 GMT, Ichiroh Takiguchi wrote: > In my understanding, sun.jnu.encoding property may be related file system > access. > Java may not be access to appropriate file. Yes, it's a JDK internal property with the charset name to use when decoding or encoding file names (no

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Ichiroh Takiguchi
On Sat, 6 Nov 2021 16:20:41 GMT, Alan Bateman wrote: >> @naotoj >> I'm not reviewer. >> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding >> system property's fallback ? > >> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding >> system property'

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Alan Bateman
On Sat, 6 Nov 2021 16:04:13 GMT, Ichiroh Takiguchi wrote: > Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding > system property's fallback ? This is about running on unusual configurations where the native encoding (native.encoding and sun.jnu.encoding) doesn't name a

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Ichiroh Takiguchi
On Fri, 5 Nov 2021 20:22:03 GMT, Naoto Sato wrote: >> Do you need to add test? > >> Do you need to add test? > > I would if I could, but specifying the environment dependent settings in the > test would be fragile and error-prone, so I did not add a test but marked the > issue as `noreg-hard`.

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Alan Bateman
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.java.net/j

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Naoto Sato
On Fri, 5 Nov 2021 20:10:28 GMT, Joe Wang wrote: > Do you need to add test? I would if I could, but specifying the environment dependent settings in the test would be fragile and error-prone, so I did not add a test but marked the issue as `noreg-hard`. - PR: https://git.openjdk.

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Joe Wang
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Do you need to add test? - Marked as reviewed by joehw (Reviewer). PR: http

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Iris Clark
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.java.net/jd

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Roger Riggs
On Fri, 5 Nov 2021 17:31:50 GMT, Naoto Sato wrote: > Please review the subject fix. In light of JEP400, Java runtime can/should > start in UTF-8 charset if the underlying native encoding is not supported. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.java.net/

RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-05 Thread Naoto Sato
Please review the subject fix. In light of JEP400, Java runtime can/should start in UTF-8 charset if the underlying native encoding is not supported. - Commit messages: - Use UTF-8 if jnuEncoding is not supported - Utilized 2-arg Charset.forName() - 8275007: Java fails to start wi