diff --git a/icu4c/source/common/ucnv_io.c b/icu4c/source/common/ucnv_io.c index cb53e203946..937d4f7f906 100644 --- a/icu4c/source/common/ucnv_io.c +++ b/icu4c/source/common/ucnv_io.c @@ -553,7 +553,7 @@ findTaggedConverterNum(const char *alias, const char *standard, UErrorCode *pErr for (idx = convStart; idx < convLimit; idx++) { listOffset = gTaggedAliasArray[idx]; if (listOffset && isAliasInList(alias, listOffset)) { - return convNum; + return idx-convStart; } } /* The standard doesn't know about the alias */ @@ -933,6 +933,7 @@ ucnv_openAllNames(UErrorCode *pErrorCode) { return myEnum; } +#ifdef ICU_UNICODECONVERTER_USE_DEPRECATES U_CFUNC void ucnv_io_fillAvailableConverters(const char **aliases, UErrorCode *pErrorCode) { if (haveAvailableConverterList(pErrorCode)) { @@ -942,6 +943,7 @@ ucnv_io_fillAvailableConverters(const char **aliases, UErrorCode *pErrorCode) { } } } +#endif U_CFUNC uint16_t ucnv_io_countAvailableAliases(UErrorCode *pErrorCode) { diff --git a/icu4c/source/common/ucnv_io.h b/icu4c/source/common/ucnv_io.h index 8a866425852..a3a7e5a6503 100644 --- a/icu4c/source/common/ucnv_io.h +++ b/icu4c/source/common/ucnv_io.h @@ -106,6 +106,7 @@ ucnv_io_countAvailableConverters(UErrorCode *pErrorCode); U_CFUNC const char * ucnv_io_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode); +#ifdef ICU_UNICODECONVERTER_USE_DEPRECATES /** * Fill an array const char *aliases[ucnv_io_countAvailableConverters()] * with pointers to all converter names in mixed-case. @@ -114,6 +115,7 @@ ucnv_io_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode); */ U_CFUNC void ucnv_io_fillAvailableConverters(const char **aliases, UErrorCode *pErrorCode); +#endif /** * Return the (n)th converter name in mixed case, or NULL