diff --git a/icu4c/source/common/unicode/uloc.h b/icu4c/source/common/unicode/uloc.h index 7f98a098574..9cd7f5e1b0d 100644 --- a/icu4c/source/common/unicode/uloc.h +++ b/icu4c/source/common/unicode/uloc.h @@ -399,6 +399,9 @@ uloc_setDefault(const char* localeID, /** * Gets the language code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the ISO language code with * @param language the language code for localeID * @param languageCapacity the size of the language buffer to store the @@ -417,6 +420,9 @@ uloc_getLanguage(const char* localeID, /** * Gets the script code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the ISO language code with * @param script the language code for localeID * @param scriptCapacity the size of the language buffer to store the @@ -435,6 +441,9 @@ uloc_getScript(const char* localeID, /** * Gets the country code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the country code with * @param country the country code for localeID * @param countryCapacity the size of the country buffer to store the @@ -453,6 +462,9 @@ uloc_getCountry(const char* localeID, /** * Gets the variant code for the specified locale. * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * @param localeID the locale to get the variant code with * @param variant the variant code for localeID * @param variantCapacity the size of the variant buffer to store the @@ -471,6 +483,10 @@ uloc_getVariant(const char* localeID, /** * Gets the full name for the specified locale. + * + * This function may return with a failure error code for certain kinds of inputs + * but does not fully check for well-formed locale IDs / language tags. + * * Note: This has the effect of 'canonicalizing' the ICU locale ID to * a certain extent. Upper and lower case are set as needed. * It does NOT map aliased names in any way.