Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by slugger415 (Monk)
on Sep 02, 2018 at 23:27 UTC ( [id://1221593]=note: print w/replies, xml ) Need Help??


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

Contents of the file, I'm just opening it locally.

  • Comment on Re^4: special characters in parsed json rendering badly in browser

Replies are listed 'Best First'.
Re^5: special characters in parsed json rendering badly in browser
by poj (Abbot) on Sep 03, 2018 at 11:58 UTC

    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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-18 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found