Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-27 Thread Naoto Sato
+1 Unfortunately, it would be too disruptive to change the decades old behavior. Naoto On 1/27/23 3:53 AM, Alan Bateman wrote: On 27/01/2023 05:42, Glavo wrote: I analyzed the usage of toLowerCase and toUpperCase in OpenJDK more carefully,  and found that none of the use cases really expect

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-27 Thread Alan Bateman
On 27/01/2023 05:42, Glavo wrote: I analyzed the usage of toLowerCase and toUpperCase in OpenJDK more carefully,  and found that none of the use cases really expected locale-sensitive behavior I expected that as there were a number of passes over these use-sites over the years. That said, if

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Xuelei Fan
> On Jan 26, 2023, at 9:52 PM, Xuelei Fan wrote: > > > >> On Jan 26, 2023, at 9:27 PM, Glavo wrote: >> >> They only need to use "str".toLowerCase(Locale.ROOT). > > Sorry, with a workaround I meant to have toLowerCase() work without modifying > the existing source code to use toLowerCase(L

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Xuelei Fan
> On Jan 26, 2023, at 9:27 PM, Glavo wrote: > > They only need to use "str".toLowerCase(Locale.ROOT). Sorry, with a workaround I meant to have toLowerCase() work without modifying the existing source code to use toLowerCase(Locale.ROOT). Xuelei > > On Fri, Jan 27, 2023 at 1:18 PM Xuelei Fa

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Glavo
: > > > -- > > *From: *"Glavo" > *To: *"core-libs-dev" > *Sent: *Thursday, January 26, 2023 1:35:06 PM > *Subject: *[Proposal] Make toLowerCase and toUpperCase based on > Locale.ROOT by default > > At present, the no-parameter toLowerCase and toUpperCas

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Glavo
They only need to use "str".toLowerCase(Locale.ROOT). On Fri, Jan 27, 2023 at 1:18 PM Xuelei Fan wrote: > Just curious, this is a known issue for many years, how those areas like > Turkish survive? Is there a workaround for those areas or the use of the > methods is not common any longer? > > X

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Xuelei Fan
Just curious, this is a known issue for many years, how those areas like Turkish survive? Is there a workaround for those areas or the use of the methods is not common any longer? Xuelei > On Jan 26, 2023, at 4:35 AM, Glavo wrote: > > At present, the no-parameter toLowerCase and toUpperCase

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Glavo
lavo" > *To: *"core-libs-dev" > *Sent: *Thursday, January 26, 2023 1:35:06 PM > *Subject: *[Proposal] Make toLowerCase and toUpperCase based on > Locale.ROOT by default > > At present, the no-parameter toLowerCase and toUpperCase methods of String > are based o

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Remi Forax
> From: "Glavo" > To: "core-libs-dev" > Sent: Thursday, January 26, 2023 1:35:06 PM > Subject: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by > default > At present, the no-parameter toLowerCase and toUpperCase methods of String a

[Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Glavo
At present, the no-parameter toLowerCase and toUpperCase methods of String are based on the default locale. I checked all the uses of this method in OpenJDK, and found that most of the use cases are suspicious, and even there are some hidden bugs. For example, I just found that jdk.incubator.vecto