ICU-1501 fix to handle surrogates
X-SVN-Rev: 7258
This commit is contained in:
parent
dafa4debfb
commit
514ea083f8
@ -105,9 +105,10 @@ void TitlecaseTransliterator::handleTransliterate(
|
||||
// in which case we want to start in toLower mode. If the
|
||||
// prior context is anything else (including empty) then start
|
||||
// in toTitle mode.
|
||||
int32_t start = offsets.start;
|
||||
while (start > offsets.contextStart) {
|
||||
UChar c = text.charAt(--start);
|
||||
UChar32 c;
|
||||
int32_t start;
|
||||
for (start = offsets.start - 1; start >= offsets.contextStart; start -= UTF_CHAR_LENGTH(c)) {
|
||||
c = text.char32At(start);
|
||||
if (SKIP->contains(c)) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user