in reply to print unicode characters from hex format
In case you are talking about Windows, there are some obstacles:
I recently found that Data::Dumper on a Windows Console migth mess it up, maybe you find
$Data::Dumper::Useperl = 1;
helpful in that case or avoid Data::Dumper. I havenīt dug deeper than that, as it was just the debugging output that was not as expected.
To change the consoleīs codepage on Windows to utf-8:
chcp 65001
and the window should use a utf8-capable font like Lucida console.
On Linux you could check if a utf-8 locale is set, if you use a certain terminal like Putty, check for that being set to e.g. UTF8. In case of doubt, do the output and convert to hex to see what is going on and what changes throughout changes.
If those characters are formatted right in memory, saving them to a file requires that files output mode set to UTF-8.
e.g. for File::Slurp
write_file ($filename, {binmode => ':utf8'}, $string);
|
|---|