diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index cd05c346e0a..7fa3768ef66 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -569,9 +569,12 @@ int32_t RuleBasedBreakIterator::preceding(int32_t offset) { // move backwards one codepoint to prepare for moving forwards to a // safe point. // this handles offset being between a supplementary character + // TODO: would it be better to just check for being in the middle of a surrogate pair, + // rather than adjusting the position unconditionally? + // (Change would interact with safe rules.) fText->previous32(); handleNext(fData->fSafeFwdTable); - int32_t result = /*previous(); */ fText->getIndex(); + int32_t result = fText->getIndex(); while (result >= offset) { result = previous(); } diff --git a/icu4c/source/data/brkitr/line.txt b/icu4c/source/data/brkitr/line.txt index 0a53aa193aa..e3abf99ff10 100644 --- a/icu4c/source/data/brkitr/line.txt +++ b/icu4c/source/data/brkitr/line.txt @@ -388,6 +388,4 @@ $QU $CM* $SP+; $CL $CM* $SP+; # LB 18 -$HY $CM* $NU; -$IS $CM* $CL; -$SY $CM* $CL; +$CM* $PRcm? ($OPcm | $HYcm)? $NU;