ICU-6628 ignore @collation=default`
X-SVN-Rev: 24974
This commit is contained in:
parent
d52ac24d1e
commit
2a70d1d602
@ -183,7 +183,8 @@ ucol_open_internal(const char *loc,
|
||||
UResourceBundle *collElem = NULL;
|
||||
char keyBuffer[256];
|
||||
// if there is a keyword, we pick it up and try to get elements
|
||||
if(!uloc_getKeywordValue(loc, "collation", keyBuffer, 256, status)) {
|
||||
if(!uloc_getKeywordValue(loc, "collation", keyBuffer, 256, status) ||
|
||||
!uprv_strcmp(keyBuffer,"default")) { /* Treat 'zz@collation=default' as 'zz'. */
|
||||
// no keyword. we try to find the default setting, which will give us the keyword value
|
||||
intStatus = U_ZERO_ERROR;
|
||||
// finding default value does not affect collation fallback status
|
||||
|
@ -2263,9 +2263,8 @@ static void TestDefaultKeyword(void) {
|
||||
UCollator *coll = ucol_open(loc, &status);
|
||||
if(U_FAILURE(status)) {
|
||||
log_info("Warning: ucol_open(%s, ...) returned %s, at least it didn't crash.\n", loc, u_errorName(status));
|
||||
} else if (status != U_USING_DEFAULT_WARNING) {
|
||||
/* What do you mean that you know about using pinyin collation in Spanish!? This should be in the zh locale. */
|
||||
log_err("ucol_open(%s, ...) should return an error or some sort of U_USING_DEFAULT_WARNING, but returned %s\n", loc, u_errorName(status));
|
||||
} else if (status != U_USING_FALLBACK_WARNING) {
|
||||
log_err("ucol_open(%s, ...) should return an error or some sort of U_USING_FALLBACK_WARNING, but returned %s\n", loc, u_errorName(status));
|
||||
}
|
||||
ucol_close(coll);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user