To avoid having to use <precheck> for tests that require UTF-8 support.
Closes #15039
- `brotli`
- `c-ares`
- `CharConv`
+- `codeset-utf8`. If the running codeset is UTF-8 capable.
- `cookies`
- `crypto`
- `Debug`
IDN
http
proxy
+codeset-utf8
</features>
<setenv>
LC_ALL=
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
HTTP over proxy with malformatted IDN host name
</name>
IDN
http
proxy
+codeset-utf8
</features>
<setenv>
LC_ALL=
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
HTTP over proxy with too long IDN host name
</name>
<command>
-http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/%TESTNUMBER -x %HOSTIP:%NOLISTENPORT
+http://too-long-IDN-name-cürl-rüles-la-la-la-dee-da-flooby-nooby.local/page/%TESTNUMBER -x %HOSTIP:%NOLISTENPORT
</command>
</client>
</server>
<features>
IDN
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
Redirect following to UTF-8 IDN host name
</name>
<features>
IDN
proxy
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
HTTP over proxy with IDN host name
</name>
</server>
<features>
IDN
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
Connection reuse with IDN host name
</name>
<features>
IDN
proxy
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
Connection reuse with IDN host name over HTTP proxy
</name>
</server>
<features>
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support - UTF-8 based sender (local part only)
</name>
</server>
<features>
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support - UTF-8 based recipient (local part only)
</name>
</server>
<features>
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
</name>
</server>
<features>
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
</name>
<features>
!IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
</name>
<features>
!IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support - UTF-8 based recipient (host part only)
</name>
<features>
!IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (host part only)
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only)
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP external VRFY without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only)
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP with SMTPUTF8 support - UTF-8 based sender
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP with SMTPUTF8 support - UTF-8 based recipient
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP external VRFY with SMTPUTF8 support
</name>
<features>
IDN
!win32
+codeset-utf8
</features>
<setenv>
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
</setenv>
-<precheck>
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-</precheck>
<name>
SMTP VRFY with SMTPUTF8 support
</name>
use Digest::MD5 qw(md5);
use List::Util 'sum';
+use I18N::Langinfo qw(langinfo CODESET);
use pathhelp qw(
exe_ext
$feature{"large-time"} = 1;
$feature{"sha512-256"} = 1;
$feature{"local-http"} = servers::localhttp();
+ $feature{"codeset-utf8"} = lc(langinfo(CODESET())) eq "utf-8";
# make each protocol an enabled "feature"
for my $p (@protocols) {