From 0d7d8b502321cdd3d041b756c742a4805b009f8f Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 17 Feb 2022 15:33:39 +0100 Subject: [PATCH] tools: validate utf8 encoding in stdin/out Recommended by perlcritic. Not likely to be an issue in these cases, but might yet catch some data errors. --- tools/mkcharinfo | 2 +- tools/mkclioptions | 2 +- tools/mkdigraphlist | 2 +- tools/mkdigraphs-plan9 | 2 +- tools/mkdigraphs-rfc | 2 +- tools/mkdigraphs-shiar | 2 +- tools/mkdigraphs-xorg | 2 +- tools/mkfontinfo | 2 +- tools/mkwordlist | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/mkcharinfo b/tools/mkcharinfo index 0f5d9bb..6d08f9e 100755 --- a/tools/mkcharinfo +++ b/tools/mkcharinfo @@ -4,7 +4,7 @@ use warnings; use utf8; no if $] >= 5.018, warnings => 'experimental::smartmatch'; -use open OUT => ':utf8', ':std'; +use open OUT => ':encoding(utf-8)', ':std'; use Data::Dump 'pp'; our $VERSION = '1.02'; diff --git a/tools/mkclioptions b/tools/mkclioptions index 54192b0..74cdcf6 100755 --- a/tools/mkclioptions +++ b/tools/mkclioptions @@ -3,7 +3,7 @@ use 5.014; use warnings; use utf8; use re '/msx'; -use open OUT => ':utf8', ':std'; +use open OUT => ':encoding(utf-8)', ':std'; our $VERSION = '1.00'; diff --git a/tools/mkdigraphlist b/tools/mkdigraphlist index 2d1fdbd..3bc6ff4 100755 --- a/tools/mkdigraphlist +++ b/tools/mkdigraphlist @@ -4,7 +4,7 @@ use strict; use warnings; use utf8; -use open OUT => ':utf8', ':std'; +use open OUT => ':encoding(utf-8)', ':std'; our $VERSION = '1.06'; diff --git a/tools/mkdigraphs-plan9 b/tools/mkdigraphs-plan9 index 31bab3c..41615ef 100755 --- a/tools/mkdigraphs-plan9 +++ b/tools/mkdigraphs-plan9 @@ -2,7 +2,7 @@ use 5.014; use warnings; use utf8; -use open IO => ':utf8', ':std'; +use open IO => ':encoding(utf-8)', ':std'; use Data::Dump 'pp'; our $VERSION = '1.01'; diff --git a/tools/mkdigraphs-rfc b/tools/mkdigraphs-rfc index 989c926..48ce7f0 100755 --- a/tools/mkdigraphs-rfc +++ b/tools/mkdigraphs-rfc @@ -2,7 +2,7 @@ use 5.014; use warnings; use utf8; -use open OUT => ':utf8', ':std'; +use open OUT => ':encoding(utf-8)', ':std'; use charnames ':full'; use Data::Dump 'pp'; diff --git a/tools/mkdigraphs-shiar b/tools/mkdigraphs-shiar index 55134b4..58da37c 100755 --- a/tools/mkdigraphs-shiar +++ b/tools/mkdigraphs-shiar @@ -1,7 +1,7 @@ #!/usr/bin/env perl use 5.014; use warnings; -use open IN => ':utf8', ':std'; +use open IN => ':encoding(utf-8)', ':std'; our $VERSION = '1.03'; diff --git a/tools/mkdigraphs-xorg b/tools/mkdigraphs-xorg index aeed5fe..c2dd441 100755 --- a/tools/mkdigraphs-xorg +++ b/tools/mkdigraphs-xorg @@ -2,7 +2,7 @@ use 5.014; use warnings; use utf8; -use open IO => ':utf8', ':std'; +use open IO => ':encoding(utf-8)', ':std'; use re '/msx'; use Data::Dump 'pp'; diff --git a/tools/mkfontinfo b/tools/mkfontinfo index e7cd4f5..9533025 100755 --- a/tools/mkfontinfo +++ b/tools/mkfontinfo @@ -3,7 +3,7 @@ use 5.014; use warnings; use utf8; -use open OUT => ':utf8', ':std'; +use open OUT => ':encoding(utf-8)', ':std'; use File::Basename 'basename'; use Data::Dump 'pp'; diff --git a/tools/mkwordlist b/tools/mkwordlist index 6f42fc8..78e36b6a 100755 --- a/tools/mkwordlist +++ b/tools/mkwordlist @@ -4,7 +4,7 @@ use warnings; BEGIN { push @INC, '.' } use Shiar_Sheet::DB; -use open ':std' => ':utf8'; +use open ':std' => ':encoding(utf-8)'; my $db = Shiar_Sheet::DB->connect; say 'use utf8;'; -- 2.30.0