Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by poj (Abbot)
on Sep 09, 2018 at 15:02 UTC ( #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
Node Status?
node history
Node Type: note [id://1221982]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2020-03-30 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (176 votes). Check out past polls.

    Notices?