-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LANG-1453: using toUpperCase instead of toLowerCase solve the problem #420
Conversation
…aracter in iso-8859-1 encoding
Please, review the conversation of the pull request #340 |
@@ -2687,6 +2687,9 @@ public void testRemoveIgnoreCase_String() { | |||
|
|||
// StringUtils.removeIgnoreCase("queued", "zZ") = "queued" | |||
assertEquals("queued", StringUtils.removeIgnoreCase("queued", "zZ")); | |||
|
|||
// StringUtils.removeIgnoreCase("İa", "a") = "İ" | |||
assertEquals("İ", StringUtils.removeIgnoreCase("İa", "a")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to minimally replace "İ"
with "\u0130"
for this to properly work. For example try running:
System.out.println("İ");
System.out.println("\u0130");
only the second will give your desired output. That said, your point is still quite valid.
I agree with @cesartxt - it seems that this resolves the unit tests as written for |
An example of another character that has this problem from the lowercase alphabet is |
Another non-deprecated Unicode character that has this and yes @garydgregory there is a point here as I read an article that proported that there was at least one Turkish loss of life due to a cell phone mistranslating the specific character in question in the proposed tests for LANG-1453 |
Thanks! for the context with this new info I'll be trying to find a good solution |
Yeah. I fiddled with it some today and didn’t see any clever solution that wasn’t brute force. I think we may have to check both situations. |
Closing this pull request because doesn't resolve the problem and the issue is duplicated with LANG-1406 |
I changed the using of toLowerCase to toUpperCase on replace function on StringUtils. more detailed info is in a comment on Jira