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
|
// in which case we want to start in toLower mode. If the
|
||||||
// prior context is anything else (including empty) then start
|
// prior context is anything else (including empty) then start
|
||||||
// in toTitle mode.
|
// in toTitle mode.
|
||||||
int32_t start = offsets.start;
|
UChar32 c;
|
||||||
while (start > offsets.contextStart) {
|
int32_t start;
|
||||||
UChar c = text.charAt(--start);
|
for (start = offsets.start - 1; start >= offsets.contextStart; start -= UTF_CHAR_LENGTH(c)) {
|
||||||
|
c = text.char32At(start);
|
||||||
if (SKIP->contains(c)) {
|
if (SKIP->contains(c)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user