saravana arumugam wrote:Is there any scenario, that the second `toLowerCase` call captures that in fact, `toUpperCase` doesn't capture.
0x00b5 is 181 in decimal.The Unicode Standard, Version 17.0 wrote:. . .
00B5 μ MICRO SIGN
≈ 03BC μ greek small letter mu . . .
Indeed it should. This table from the Unicode standard confirms it. Which isn't surprising because Java supports Unicode and has done so since Java 1.0.Campbell Ritchie wrote:Should the micro sign have an upper‑case equivalent in the first place?
Just because it looks like a μ, and μ definitely has an upper‑case equivalent doesn't mean the micro sign should have an upper‑case equivalent. The Unicode chart doesn't say that U+00B5 has an upper‑case equivalent but it does mention μ, The Greek chart has μ and Μ almost next to each other, so if you know, it is obvious that they are intended to be paired like that. The names also include CAPITAL and SMALL, which are the names I learnt as a little schoolboy.Paul Clapham wrote:. . . Indeed it should. . . .
I think they have read something into Unicode that isn't in Unicode in the first place.jshell> String s1 = "\u00b5";
s1 ==> "µ"
jshell> String s2 = "\u03bc";
s2 ==> "μ"
jshell> String.CASE_INSENSITIVE_ORDER.compare(s1, s2);
$3 ==> 0
jshell> s1.compareTo(s2);
$4 ==> -775
The documentation for CASE_INSENSITIVE_ORDER recommends using a Collator.not locale-sensitive . . . basically obsolete . . . .
Campbell Ritchie wrote:The Unicode chart doesn't say that U+00B5 has an upper‑case equivalent...
Unicode wrote:00B5;MICRO SIGN;Ll;0;L;<compat> 03BC;;;;N;;;039C;;039C
