Skip to content
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

Fix for analysis culture sensitivity and surrogate pair support #321

Merged

Conversation

NightOwl888
Copy link
Contributor

@NightOwl888 NightOwl888 commented Aug 2, 2020

This fixes several Analysis.Common classes that were broken since 4.8.0-beta00008 in commit b733c4d because the Character class was changed to J2N which uses the current culture by default instead of Java's default of invariant culture for uppercasing and lowercasing. As a result, these classes were unintentionally modified in behavior. This patch reverts them back to the invariant culture (or specific culture for the class, where applicable).

Also, a bug was discovered where a cast from int to char caused many analysis classes to incorrectly process surrogate pairs, which this addresses.

We were also able to revert the TurkishLowercaseFilter back to its original implementation by utilizing J2N.Character to do the heavy lifting instead of System.Char.

…sing invariant culture to do so again. J2N's Character class default is to use the current culture, which had changed from the prior Character class that used invariant culture. Fixes TestICUFoldingFilter::TestRandomStrings().
@NightOwl888 NightOwl888 merged commit 9ce76e9 into apache:master Aug 2, 2020
@clambertus clambertus mentioned this pull request Aug 2, 2020
29 tasks
@NightOwl888 NightOwl888 added this to the 4.8.0-beta00012 milestone Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant