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

ICU-22986 GL takes CM #3296

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

ICU-22986 GL takes CM #3296

wants to merge 10 commits into from

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin commented Dec 10, 2024

A bug in the production implementation, which was not caught in ICU 76 because it is duplicated in the new monkeys (whose rules are similar to the production rules in the ways that matter here) and because of an equivalent bug in the old old monkeys: we should have looked through CM* for GL in

// prevPosX2 is -1 if there was a break; but the UAX #14 rules can
// look through breaks.
int breakObliviousPrevPosX2 = fText->moveIndex32(prevPos, -1);
if (fBK->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fCR->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fLF->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fNL->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fSP->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fGL->contains(fText->char32At(breakObliviousPrevPosX2)) ||
fZW->contains(fText->char32At(breakObliviousPrevPosX2))) {
setAppliedRule(pos, "LB 20a");
continue;
}

The new old monkeys (after ICU-22984=#3287) are much more principled about remap rules, actually modifying the working buffer, and so caught that.

Also fix an issue with insufficiently greedy regular expressions in the rules (new rules generated from unicode-org/unicodetools#988) and with remap rules creating characters out of surrogates (as in <lead, combining mark, trail>).

Checklist

  • Required: Issue filed: ICU-22986
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/test/testdata/rbbitst.txt is now changed in the branch
  • icu4j/main/core/src/test/resources/com/ibm/icu/dev/test/rbbi/rbbitst.txt is now changed in the branch

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@eggrobin eggrobin marked this pull request as ready for review December 10, 2024 17:17
@eggrobin eggrobin requested a review from markusicu December 10, 2024 17:18
@markusicu markusicu self-assigned this Dec 10, 2024
@markusicu markusicu requested a review from aheninger December 10, 2024 18:24
@markusicu
Copy link
Member

changes lgtm (=as advertised)
i need to figure out a new recipe for flipping the bytes, since the tool is shifting

@aheninger
Copy link
Contributor

The changes look good, but they also need to be propagated into the various line rule tailorings, line_cj.txt, etc.

@eggrobin
Copy link
Member Author

Thanks for pointing that out @aheninger. Done.

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.

3 participants