mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-8815 Sync the ICU canonical name lookup between ICU4C and ICU4J and update alias table
X-SVN-Rev: 30652
This commit is contained in:
parent
707069804b
commit
3873726831
2 changed files with 25 additions and 6 deletions
|
@ -749,13 +749,32 @@ findTaggedConverterNum(const char *alias, const char *standard, UErrorCode *pErr
|
|||
|
||||
U_CFUNC const char *
|
||||
ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *pErrorCode) {
|
||||
if(haveAliasData(pErrorCode) && isAlias(alias, pErrorCode)) {
|
||||
uint32_t convNum = findConverter(alias, containsOption, pErrorCode);
|
||||
if (convNum < gMainTable.converterListSize) {
|
||||
return GET_STRING(gMainTable.converterList[convNum]);
|
||||
const char *aliasTmp = alias;
|
||||
int32_t i = 0;
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (i == 1) {
|
||||
/*
|
||||
* After the first unsuccess converter lookup, check to see if
|
||||
* the name begins with 'x-'. If it does, strip it off and try
|
||||
* again. This behaviour is similar to how ICU4J does it.
|
||||
*/
|
||||
if (aliasTmp[0] == 'x' || aliasTmp[1] == '-') {
|
||||
aliasTmp = aliasTmp+2;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(haveAliasData(pErrorCode) && isAlias(aliasTmp, pErrorCode)) {
|
||||
uint32_t convNum = findConverter(aliasTmp, containsOption, pErrorCode);
|
||||
if (convNum < gMainTable.converterListSize) {
|
||||
return GET_STRING(gMainTable.converterList[convNum]);
|
||||
}
|
||||
/* else converter not found */
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
/* else converter not found */
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -931,7 +931,7 @@ macos-38_2-10.2 { UTR22* } x-mac-romania { MIME* } x-MacRomania { JAVA* } M
|
|||
macos-518-10.2 { UTR22* } x-mac-arabic { MIME* } x-MacArabic { JAVA* } MacArabic { JAVA }
|
||||
macos-1285-10.2 { UTR22* } x-mac-hebrew { MIME* } x-MacHebrew { JAVA* } MacHebrew { JAVA }
|
||||
|
||||
ibm-1051_P100-1995 { UTR22* } ibm-1051 { IBM* } hp-roman8 { IANA* } roman8 { IANA } r8 { IANA } csHPRoman8 { IANA } # HP Latin1
|
||||
ibm-1051_P100-1995 { UTR22* } ibm-1051 { IBM* } hp-roman8 { IANA* } roman8 { IANA } r8 { IANA } csHPRoman8 { IANA } x-roman8 { JAVA} # HP Latin1
|
||||
ibm-1276_P100-1995 { UTR22* } ibm-1276 { IBM* } Adobe-Standard-Encoding { IANA* } csAdobeStandardEncoding { IANA } # Different from ISO-Unicode-IBM-1276 (GCSGID: 1276)
|
||||
|
||||
ibm-1006_P100-1995 { UTR22* } ibm-1006 { IBM* } IBM1006 { JAVA } cp1006 { JAVA* } 1006 { JAVA } x-IBM1006 { JAVA } # Urdu
|
||||
|
|
Loading…
Add table
Reference in a new issue