On Mon, 4 Aug 2025 23:57:28 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Enabling lenient minus sign matching when parsing numbers. In some locales, 
>> e.g. Finnish, the default minus sign is the Unicode "Minus Sign" (U+2212), 
>> which is not the "Hyphen Minus" (U+002D) that users type in from keyboard. 
>> Thus the parsing of user input numbers may fail. This change utilizes CLDR's 
>> `parseLenient` element for minus signs and loosely matches them with the 
>> hyphen-minus so that user input numbers can parse. As this is a behavioral 
>> change, a corresponding CSR has been drafted.
>
> Naoto Sato has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   refrects review comments

OK, I decided to explictly exclude those supplementary/normalization cases 
where the affix lengths would change. If we wanted to make it work with 
supplementary/normalization, it needs to account for the variable affix length 
and needs lots of changes in DecimalFormat/CompactNumberFormat, and I think not 
worth it (complex changes for non-existent leniency). So I adopted Justin's 
char based iteration (thanks!). Test has been modified to explicitly verify 
this behavior (for supplementary, normalization is obvious)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26580#issuecomment-3152835000

Reply via email to