diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md
index aa02baff1fa7b4..fc773b6a280ff1 100644
--- a/tests/FILEFORMAT.md
+++ b/tests/FILEFORMAT.md
@@ -432,6 +432,7 @@ Features testable here are:
- `brotli`
- `c-ares`
- `CharConv`
+- `codeset-utf8`. If the running codeset is UTF-8 capable.
- `cookies`
- `crypto`
- `Debug`
diff --git a/tests/data/test1034 b/tests/data/test1034
index 09a4dd5f3fd5b2..7e62f6d63b4121 100644
--- a/tests/data/test1034
+++ b/tests/data/test1034
@@ -26,14 +26,12 @@ none
IDN
http
proxy
+codeset-utf8
LC_ALL=
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
HTTP over proxy with malformatted IDN host name
diff --git a/tests/data/test1035 b/tests/data/test1035
index 0bbaabf9c8ff26..e162022fe874d2 100644
--- a/tests/data/test1035
+++ b/tests/data/test1035
@@ -24,19 +24,17 @@ none
IDN
http
proxy
+codeset-utf8
LC_ALL=
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
HTTP over proxy with too long IDN host name
-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
diff --git a/tests/data/test1448 b/tests/data/test1448
index 1544d3936f45bc..33aedc4f011a5a 100644
--- a/tests/data/test1448
+++ b/tests/data/test1448
@@ -40,14 +40,12 @@ http
IDN
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
Redirect following to UTF-8 IDN host name
diff --git a/tests/data/test165 b/tests/data/test165
index e9237d89cddddc..39787db87e593a 100644
--- a/tests/data/test165
+++ b/tests/data/test165
@@ -30,14 +30,12 @@ http
IDN
proxy
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
HTTP over proxy with IDN host name
diff --git a/tests/data/test2046 b/tests/data/test2046
index 3aefd25c966750..c0d3a0e8250336 100644
--- a/tests/data/test2046
+++ b/tests/data/test2046
@@ -40,14 +40,12 @@ http
IDN
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
Connection reuse with IDN host name
diff --git a/tests/data/test2047 b/tests/data/test2047
index 82e9a14aaa43c2..1d7be6db364a84 100644
--- a/tests/data/test2047
+++ b/tests/data/test2047
@@ -41,14 +41,12 @@ http
IDN
proxy
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
Connection reuse with IDN host name over HTTP proxy
diff --git a/tests/data/test955 b/tests/data/test955
index 24cc2b7e431468..982afc352ee6ed 100644
--- a/tests/data/test955
+++ b/tests/data/test955
@@ -21,14 +21,12 @@ smtp
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support - UTF-8 based sender (local part only)
diff --git a/tests/data/test956 b/tests/data/test956
index 1180523bbd2b89..22bf3a14fa172d 100644
--- a/tests/data/test956
+++ b/tests/data/test956
@@ -18,14 +18,12 @@ smtp
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support - UTF-8 based recipient (local part only)
diff --git a/tests/data/test957 b/tests/data/test957
index 1b01b7e53acaef..d49739d84f0a7c 100644
--- a/tests/data/test957
+++ b/tests/data/test957
@@ -19,14 +19,12 @@ smtp
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
diff --git a/tests/data/test958 b/tests/data/test958
index 3ad77fe1030822..ea5a2dbae64dc5 100644
--- a/tests/data/test958
+++ b/tests/data/test958
@@ -19,14 +19,12 @@ smtp
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (local part only)
diff --git a/tests/data/test959 b/tests/data/test959
index 421d6ba98767f0..178e0f13c40706 100644
--- a/tests/data/test959
+++ b/tests/data/test959
@@ -22,14 +22,12 @@ smtp
!IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
diff --git a/tests/data/test960 b/tests/data/test960
index 9f33fdc7977852..2cf348eb53dce4 100644
--- a/tests/data/test960
+++ b/tests/data/test960
@@ -19,14 +19,12 @@ smtp
!IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support - UTF-8 based recipient (host part only)
diff --git a/tests/data/test961 b/tests/data/test961
index c416b97614ba1a..57958a4eb0afc0 100644
--- a/tests/data/test961
+++ b/tests/data/test961
@@ -20,14 +20,12 @@ smtp
!IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP external VRFY without SMTPUTF8 support - UTF-8 based recipient (host part only)
diff --git a/tests/data/test962 b/tests/data/test962
index 09bfb51000d003..6ac4ab08c2d85c 100644
--- a/tests/data/test962
+++ b/tests/data/test962
@@ -20,14 +20,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support - UTF-8 based sender (host part only)
diff --git a/tests/data/test963 b/tests/data/test963
index 02fc0b851b565f..9fe94f894cef2b 100644
--- a/tests/data/test963
+++ b/tests/data/test963
@@ -20,14 +20,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only)
diff --git a/tests/data/test964 b/tests/data/test964
index e03dc333e482d8..05dbda9319bd5e 100644
--- a/tests/data/test964
+++ b/tests/data/test964
@@ -21,14 +21,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP external VRFY without SMTPUTF8 support (IDN Enabled) - UTF-8 based recipient (host part only)
diff --git a/tests/data/test965 b/tests/data/test965
index f8adbdefe944da..f44239e784c692 100644
--- a/tests/data/test965
+++ b/tests/data/test965
@@ -23,14 +23,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP with SMTPUTF8 support - UTF-8 based sender
diff --git a/tests/data/test966 b/tests/data/test966
index e43f860ec49461..31b6c288f1c34a 100644
--- a/tests/data/test966
+++ b/tests/data/test966
@@ -23,14 +23,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP with SMTPUTF8 support - UTF-8 based recipient
diff --git a/tests/data/test967 b/tests/data/test967
index 898fbb106b4d88..d823b4839e9e1c 100644
--- a/tests/data/test967
+++ b/tests/data/test967
@@ -27,14 +27,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP external VRFY with SMTPUTF8 support
diff --git a/tests/data/test968 b/tests/data/test968
index c27a3675f85e5c..b057be62917c63 100644
--- a/tests/data/test968
+++ b/tests/data/test968
@@ -24,14 +24,12 @@ smtp
IDN
!win32
+codeset-utf8
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
-
-perl -MI18N::Langinfo=langinfo,CODESET -e 'die "Needs a UTF-8 locale" if (lc(langinfo(CODESET())) ne "utf-8");'
-
SMTP VRFY with SMTPUTF8 support
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 4764ba31aabe0f..197e1458963d3f 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -83,6 +83,7 @@ BEGIN
use Digest::MD5 qw(md5);
use List::Util 'sum';
+use I18N::Langinfo qw(langinfo CODESET);
use pathhelp qw(
exe_ext
@@ -825,6 +826,7 @@ sub checksystemfeatures {
$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) {