in reply to Re^2: UTF-8 and Unicode the hard way
in thread UTF-8 and Unicode the hard way
Corion provided the correct answer, but you failed to verify it. If you print a decoded non-ASCII character, then you get the wide character warning. This is exactly what happens when you print the result of your own substitutions:
$ perl -E "print qq(\x{100})" Wide character in print at -e line 1. Ā
Printed output needs to be encoded into a byte stream which the receiving side is able to understand. In many cases like contemporary Unix terminals, UTF-8 is a good guess - which is the encoding your $answer came from.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: UTF-8 and Unicode the hard way
by Anonymous Monk on May 10, 2022 at 17:26 UTC | |
by hippo (Bishop) on May 10, 2022 at 17:38 UTC | |
by Anonymous Monk on May 10, 2022 at 17:42 UTC | |
by Anonymous Monk on May 10, 2022 at 17:32 UTC | |
by jdporter (Paladin) on May 10, 2022 at 17:40 UTC |
In Section
Seekers of Perl Wisdom