From: Markus Scherer Date: Thu, 24 Aug 2017 20:36:19 +0000 (+0000) Subject: ICU-13332 CaseMapImpl.isFollowedByCasedLetter() must increment the string index while... X-Git-Tag: release-60-rc~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e9530c048b0c0f5fc57176b46185736edb0d4ae;p=icu ICU-13332 CaseMapImpl.isFollowedByCasedLetter() must increment the string index while looping X-SVN-Rev: 40353 --- diff --git a/icu4c/source/test/intltest/strcase.cpp b/icu4c/source/test/intltest/strcase.cpp index 28c93e1ec1e..2cf3ecf13e1 100644 --- a/icu4c/source/test/intltest/strcase.cpp +++ b/icu4c/source/test/intltest/strcase.cpp @@ -799,6 +799,7 @@ StringCaseTest::TestGreekUpper() { assertGreekUpper(u"Το ένα ή το άλλο.", u"ΤΟ ΕΝΑ Ή ΤΟ ΑΛΛΟ."); // http://multilingualtypesetting.co.uk/blog/greek-typesetting-tips/ assertGreekUpper(u"ρωμέικα", u"ΡΩΜΕΪΚΑ"); + assertGreekUpper(u"ή.", u"Ή."); } void diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMapImpl.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMapImpl.java index b59b54fdc33..4963bb7f9e8 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMapImpl.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMapImpl.java @@ -1038,6 +1038,7 @@ public final class CaseMapImpl { int type = UCaseProps.INSTANCE.getTypeOrIgnorable(c); if ((type & UCaseProps.IGNORABLE) != 0) { // Case-ignorable, continue with the loop. + i += Character.charCount(c); } else if (type != UCaseProps.NONE) { return true; // Followed by cased letter. } else { diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterCaseTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterCaseTest.java index a0c3dee246c..79f4139a395 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterCaseTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UCharacterCaseTest.java @@ -766,6 +766,7 @@ public final class UCharacterCaseTest extends TestFmwk assertGreekUpper("Το ένα ή το άλλο.", "ΤΟ ΕΝΑ Ή ΤΟ ΑΛΛΟ."); // http://multilingualtypesetting.co.uk/blog/greek-typesetting-tips/ assertGreekUpper("ρωμέικα", "ΡΩΜΕΪΚΑ"); + assertGreekUpper("ή.", "Ή."); } private static final class EditChange {