ICU-2720 thai backwards iteration fix, keep base consonants as unsafe code

X-SVN-Rev: 11142
This commit is contained in:
Syn Wee Quek 2003-02-22 01:26:28 +00:00
parent 0bfd14fc9b
commit 64c96bdef0
2 changed files with 4 additions and 3 deletions

View file

@ -3296,7 +3296,8 @@ uint32_t ucol_prv_getSpecialPrevCE(const UCollator *coll, UChar ch, uint32_t CE,
UCharOffset = strbuffer + (UCOL_MAX_BUFFER - 1);
*(UCharOffset --) = 0;
noChars = 0;
while (ucol_unsafeCP(schar, coll)) {
// have to swap thai characters
while (ucol_unsafeCP(schar, coll) || UCOL_ISTHAIBASECONSONANT(schar)) {
*(UCharOffset) = schar;
noChars++;
UCharOffset --;

View file

@ -221,8 +221,8 @@ void CollationThaiTest::TestDictionary(void) {
}
if (lastWord.length() > 0) {
// TODO: this line should be enabled when j2720 is fixed.
//doTest(coll, lastWord, word, Collator::LESS);
// line enabled for j2720
doTest(coll, lastWord, word, UCOL_LESS);
int32_t result = coll->compare(lastWord, word);
if (result >= 0) {