Welcome to the Monastery | |
PerlMonks |
Re: special characters in parsed json rendering badly in browserby Corion (Patriarch) |
on Sep 03, 2018 at 08:02 UTC ( [id://1221606]=note: print w/replies, xml ) | Need Help?? |
According to JSON, JSON::decode_json expects raw octets. Also, it returns already UTF-8 decoded content, so your additional decode step should not be necessary. Have you looked at the octets you download and have you verified that your problem is not in the further treatment or output of the data? Personally, I find it helpful to look at hexdumps of the octets to verify that the proper data is written to the console. I see that nowhere in the example code you binmode STDOUT, <c>':encoding(UTF-8)', maybe that would be a good step?
In Section
Seekers of Perl Wisdom
|
|