Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: special characters in parsed json rendering badly in browser

by tinita (Parson)
on Sep 02, 2018 at 09:21 UTC ( [id://1221572]=note: print w/replies, xml ) Need Help??


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

Whenever you're unsure about the content/encoding of a string, use Devel::Peek:
use Devel::Peek; Dump $decoded->{description};
It will tell you if the string is already utf8 decoded or not. Paste the result here, if unsure.
Also you might want to read https://perlgeek.de/en/article/encodings-and-unicode

Replies are listed 'Best First'.
Re^2: special characters in parsed json rendering badly in browser
by slugger415 (Monk) on Sep 02, 2018 at 19:46 UTC

    Result of Dump:

    SV = PV(0xcdc0b8) at 0x2522f38 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x3f44048 "Saturday, September 22, 2018\n7:30pm Doors / 8pm Per +formances\n $15 Guests / $10 for members: .....etc.

    and at the end:

    CUR = 3552 LEN = 3554

    thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found