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

Re^2: special characters in parsed json rendering badly in browser

by poj (Abbot)
on Sep 09, 2018 at 15:02 UTC ( [id://1221982]=note: print w/replies, xml ) Need Help??


in reply to Re: special characters in parsed json rendering badly in browser
in thread special characters in parsed json rendering badly in browser

see utf8 - The use utf8 pragma tells the Perl parser to allow UTF-8 in the program text in the current lexical scope.

use utf8; use HTML::Entities; my($text) = "Kren’s 89th birthday"; print encode_entities($text), $/; # result right single quote # Kren’s 89th birthday
poj
  • Comment on Re^2: special characters in parsed json rendering badly in browser
  • Download Code

Replies are listed 'Best First'.
Re^3: special characters in parsed json rendering badly in browser
by slugger415 (Monk) on Sep 10, 2018 at 18:45 UTC

    That's it! That's all I needed, thank you!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found