Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by slugger415 (Monk)
on Sep 02, 2018 at 19:58 UTC ( #1221589=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

charset in Firefox Windows iso-8859-1

not sure where that gets specified

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

Replies are listed 'Best First'.
Re^3: special characters in parsed json rendering badly in browser
by poj (Abbot) on Sep 02, 2018 at 20:35 UTC

    Is the browser showing the contents of a file or the response from a web server ?

    poj

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

        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
Node Status?
node history
Node Type: note [id://1221589]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-04-03 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (27 votes). Check out past polls.

    Notices?