Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: special characters in parsed json rendering badly in browser

by Corion (Pope)
on Sep 03, 2018 at 08:02 UTC ( #1221606=note: print w/replies, xml ) Need Help??


in reply to special characters in parsed json rendering badly in browser

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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1221606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2020-03-31 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (180 votes). Check out past polls.

    Notices?