Skip to content

Commit

Permalink
loc_tools: Always check for C.UTF-8 locale
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
khwilliamson committed Jul 12, 2023
1 parent 7b25dc6 commit 3245d1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/loc_tools.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3245d1b

Please sign in to comment.