What would be the name of this process?
Eh-h... just, 'encoding'?
Good news, decoding from CP932 (~ shiftjis) goes error-free, bad news, online translations (to English) seem to produce gibberish.
use strict;
use warnings;
use feature 'say';
use Encode qw/ encode decode /;
my $a = join '', map chr, qw/
226
123
226
78
233
9524
196
113
233
9568
196
191
233
8976
233
189
50
/;
my $b = join '', map chr, qw/
131
123
131
78
130
193
142
113
130
204
142
168
130
169
130
171
50
/;
############################
use Test::More;
is $a, decode( 'cp437', $b, Encode::FB_CROAK | Encode::LEAVE_SRC ), 'f
+rom b to a';
is $b, encode( 'cp437', $a, Encode::FB_CROAK | Encode::LEAVE_SRC ), 'f
+rom a to b';
done_testing;
############################
use Win32;
say Win32::GetACP;
say Win32::GetOEMCP;
say Win32::GetConsoleCP;
############################
use Imager;
my $text = decode 'cp932', $b, Encode::FB_CROAK | Encode::LEAVE_SRC;
my $image = Imager-> new( xsize => 300, ysize => 80 );
Imager::Font-> new( file => 'mona.ttf' )
-> align(
string => $text,
size => 30,
color => 'white',
x => $image-> getwidth/2,
y => $image-> getheight/2,
halign => 'center',
valign => 'center',
image => $image,
);
$image-> write( file => 'jp.png' );
############################
use Win32::LongPath;
mkdirL $text;