alhudz opened a new pull request, #1745:
URL: https://github.com/apache/commons-lang/pull/1745
`Repro`: `new StrBuilder("K").equalsIgnoreCase(new StrBuilder("K"))` (KELVIN
SIGN vs `K`) returns `false`, and so does the å/ANGSTROM pair `new
StrBuilder("å").equalsIgnoreCase(new StrBuilder("Å"))`.
`String.equalsIgnoreCase` returns `true` for both.
`Cause`: the per-character loop only rules a differing pair equal when
`Character.toUpperCase(c1) == Character.toUpperCase(c2)`. Characters that fold
together only through their lower-case mapping (`U+212A` → `k`, `U+212B` → `å`)
fail that test, so the whole compare reports not-equal.
`Fix`: also accept the pair when `Character.toLowerCase` of the upper-cased
chars agrees, the same fold `String#regionMatches` and this library's own
`CharSequenceUtils.equalsIgnoreCase` already use. The case-sensitive `equals`
sibling is untouched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]