diff --git a/locale.c b/locale.c index 507a54876ea8..d2436948b985 100644 --- a/locale.c +++ b/locale.c @@ -5659,14 +5659,6 @@ S_my_localeconv(pTHX_ const int item) continue; } - locale = (i == NUMERIC_STRING_OFFSET) - ? numeric_locale - : monetary_locale; - - if (! is_locale_utf8(locale)) { - continue; /* No string can be UTF-8 if the locale isn't */ - } - /* Examine each string */ for (const lconv_offset_t *strp = strings[i]; strp->name; strp++) { const char * name = strp->name; @@ -5680,7 +5672,7 @@ S_my_localeconv(pTHX_ const int item) /* Determine if the string should be marked as UTF-8. */ if (UTF8NESS_YES == (get_locale_string_utf8ness_i(SvPVX(*value), - LOCALE_IS_UTF8, + LOCALE_UTF8NESS_UNKNOWN, NULL, (locale_category_index) 0))) {