Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by poj (Abbot)
on Sep 03, 2018 at 11:58 UTC ( #1221619=note: print w/replies, xml ) Need Help??


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

Try adding a meta tag

#!perl use strict; use Devel::Peek; my $str = "what \x{2018}film about film\x{2019} or \x{2018}film as film\x{2019} might mean"; Dump $str; open OUT,'>:utf8','test.html' or die "$!"; print OUT '<html> <head> <meta charset="utf-8"/> </head> <body><h1>'.$str.'</h1></body></html>';
poj
  • Comment on Re^5: special characters in parsed json rendering badly in browser
  • Download Code

Log In?
Username:
Password:

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

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









    Results (171 votes). Check out past polls.

    Notices?