diff --git a/icu4c/source/i18n/translit.cpp b/icu4c/source/i18n/translit.cpp index 874bff9933..3964a20114 100644 --- a/icu4c/source/i18n/translit.cpp +++ b/icu4c/source/i18n/translit.cpp @@ -1463,7 +1463,7 @@ UBool Transliterator::initializeRegistry() { for (row = 0; row < maxRows; row++) { colBund = ures_getByIndex(transIDs, row, 0, &status); if (U_SUCCESS(status)) { - UnicodeString id(ures_getKey(colBund)); + UnicodeString id(ures_getKey(colBund), -1, US_INV); UResourceBundle* res = ures_getNextResource(colBund, NULL, &status); const char* typeStr = ures_getKey(res); UChar type; diff --git a/icu4c/source/i18n/transreg.cpp b/icu4c/source/i18n/transreg.cpp index 781ea87a60..31d534b2a3 100644 --- a/icu4c/source/i18n/transreg.cpp +++ b/icu4c/source/i18n/transreg.cpp @@ -218,7 +218,7 @@ Spec::Spec(const UnicodeString& theSpec) : top(theSpec) { UScriptCode script[capacity]={USCRIPT_INVALID_CODE}; int32_t num = uscript_getCode(topch,script,capacity, &status); if (num > 0 && script[0] != USCRIPT_INVALID_CODE) { - scriptName = UnicodeString(uscript_getName(script[0]), ""); + scriptName = UnicodeString(uscript_getName(script[0]), -1, US_INV); } // Canonicalize top diff --git a/icu4c/source/i18n/uni2name.cpp b/icu4c/source/i18n/uni2name.cpp index 648e466c3e..dcc49d758f 100644 --- a/icu4c/source/i18n/uni2name.cpp +++ b/icu4c/source/i18n/uni2name.cpp @@ -98,7 +98,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos status = U_ZERO_ERROR; if ((len = u_charName(c, U_EXTENDED_CHAR_NAME, buf, maxLen, &status)) >0 && !U_FAILURE(status)) { str.truncate(OPEN_DELIM_LEN); - str.append(UnicodeString(buf, len, "")).append(CLOSE_DELIM); + str.append(UnicodeString(buf, len, US_INV)).append(CLOSE_DELIM); text.handleReplaceBetween(cursor, cursor+clen, str); len += OPEN_DELIM_LEN + 1; // adjust for delimiters cursor += len; // advance cursor and adjust for new text