From 3d033bf1f5fc5d9dc01cbca7a56669ba939b9de8 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 20 May 2026 08:34:31 -0600 Subject: [PATCH 1/2] 001_utf8.t: Fix typos in comments This changes the IBM code page to the correct value --- t/001_utf8.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/001_utf8.t b/t/001_utf8.t index 4044e44..041dd64 100644 --- a/t/001_utf8.t +++ b/t/001_utf8.t @@ -11,7 +11,7 @@ use utf8; use JSON::PP; my $pilcrow_utf8 = (ord "^" == 0x5E) ? "\xc2\xb6" # 8859-1 - : (ord "^" == 0x5F) ? "\x80\x65" # CP 1024 + : (ord "^" == 0x5F) ? "\x80\x65" # CP 1047 : "\x78\x64"; # assume CP 037 is (JSON::PP->new->allow_nonref (1)->utf8 (1)->encode ("¶"), "\"$pilcrow_utf8\""); is (JSON::PP->new->allow_nonref (1)->encode ("¶"), "\"¶\""); @@ -26,7 +26,6 @@ is (JSON::PP->new->allow_nonref (1)->decode ('"\u00b6"'), "¶"); is (JSON::PP->new->allow_nonref (1)->decode ('"\ud801\udc02' . "\x{10204}\""), "\x{10402}\x{10204}"); my $controls = (ord "^" == 0x5E) ? "\012\\\015\011\014\010" - : (ord "^" == 0x5F) ? "\025\\\015\005\014\026" # CP 1024 + : (ord "^" == 0x5F) ? "\025\\\015\005\014\026" # CP 1047 : "\045\\\015\005\014\026"; # assume CP 037 is (JSON::PP->new->allow_nonref (1)->decode ('"\"\n\\\\\r\t\f\b"'), "\"$controls"); - From c5e6a623aa75f9c691a1333d5121bca0b4194d72 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 20 May 2026 08:35:59 -0600 Subject: [PATCH 2/2] 119_incr_parse_utf8.t: Skip on EBCDIC systems I think it's not worth the bother trying to convert this file to also work on EBCDIC, so simply skip all its tests --- t/119_incr_parse_utf8.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/119_incr_parse_utf8.t b/t/119_incr_parse_utf8.t index 90916fb..ec0ec1f 100644 --- a/t/119_incr_parse_utf8.t +++ b/t/119_incr_parse_utf8.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More; use utf8; use JSON::PP; @@ -9,6 +9,13 @@ use charnames qw< :full >; use vars qw< @vs >; +if (ord "A" == 65) { + plan tests => 24; +} +else { + plan skip_all => "Hard-coded ASCII UTF-8 doesn't play well on EBCDIC"; +} + ############################################################ ### These first tests mimic the ones in `t/001_utf8.t` ### ############################################################