mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 18:25:57 +00:00
ICU-1245 Don't add expansions if there is prefix
X-SVN-Rev: 6005
This commit is contained in:
parent
1cd00f680f
commit
8c36ad46b5
1 changed files with 6 additions and 3 deletions
|
@ -369,7 +369,7 @@ U_CFUNC uint32_t ucol_getCEGenerator(ucolCEGenerator *g, uint32_t* lows, uint32_
|
|||
|
||||
uint32_t count = tok->toInsert;
|
||||
|
||||
if(low == high && strength > UCOL_PRIMARY) {
|
||||
if(low >= high && strength > UCOL_PRIMARY) {
|
||||
int32_t s = strength;
|
||||
for(;;) {
|
||||
s--;
|
||||
|
@ -378,7 +378,7 @@ U_CFUNC uint32_t ucol_getCEGenerator(ucolCEGenerator *g, uint32_t* lows, uint32_
|
|||
low = UCOL_COMMON_TOP2<<24;
|
||||
high = 0xFFFFFFFF;
|
||||
} else {
|
||||
//low = 0x02000000;
|
||||
low = 0x02000000;
|
||||
high = 0x40000000;
|
||||
}
|
||||
break;
|
||||
|
@ -701,7 +701,7 @@ U_CFUNC void ucol_createElements(UColTokenParser *src, tempUCATable *t, UColTokL
|
|||
/* first, check if there are any expansions */
|
||||
/* if there are expansions, we need to do a little bit more processing */
|
||||
/* since parts of expansion can be tailored, while others are not */
|
||||
if(tok->expansion != 0) {
|
||||
if(tok->expansion != 0 && tok->prefix == 0) {
|
||||
uint32_t len = tok->expansion >> 24;
|
||||
uint32_t currentSequenceLen = len;
|
||||
uint32_t expOffset = tok->expansion & 0x00FFFFFF;
|
||||
|
@ -882,6 +882,9 @@ UCATableHeader *ucol_assembleTailoringTable(UColTokenParser *src, UErrorCode *st
|
|||
if(U_SUCCESS(*status)) {
|
||||
ucol_initBuffers(&src->lh[i], status);
|
||||
}
|
||||
if(U_FAILURE(*status)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue