From 3245d1b923d7138337f1b14367456f143e972d7c Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 3 Jul 2023 17:03:44 -0600 Subject: [PATCH] loc_tools: Always check for C.UTF-8 locale On many platforms this is a basic included locale, and there is even a Configure probe for its existence, which we can take advantage of. --- t/loc_tools.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/loc_tools.pl b/t/loc_tools.pl index 35629865d452..38aa1772cb34 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -462,6 +462,10 @@ ($;$) _trylocale("C", \@categories, \@Locale, $allow_incompatible); _trylocale("POSIX", \@categories, \@Locale, $allow_incompatible); + if ($Config{d_has_C_UTF8} && $Config{d_has_C_UTF8} eq 'true') { + _trylocale("C.UTF-8", \@categories, \@Locale, $allow_incompatible); + } + # There's no point in looking at anything more if we know that # setlocale will return success on any garbage or non-garbage name. return sort @Locale