ICU-2259 need to increment i by UTF16.getCharCount(cp) in setSource.

X-SVN-Rev: 15051
This commit is contained in:
Eric Mader 2004-04-26 19:55:09 +00:00
parent ae02d24abd
commit 6cff8a8cab

View File

@ -125,7 +125,7 @@ public final class CanonicalIterator {
int i = UTF16.findOffsetFromCodePoint(source, 1); int i = UTF16.findOffsetFromCodePoint(source, 1);
for (; i < source.length(); i += UTF16.getCharCount(i)) { for (; i < source.length(); i += UTF16.getCharCount(cp)) {
cp = UTF16.charAt(source, i); cp = UTF16.charAt(source, i);
if (NormalizerImpl.isCanonSafeStart(cp)) { if (NormalizerImpl.isCanonSafeStart(cp)) {
list.add(source.substring(start, i)); // add up to i list.add(source.substring(start, i)); // add up to i