Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to deal with mixed encoding.

by Corion (Patriarch)
on Jul 13, 2022 at 13:39 UTC ( [id://11145489]=note: print w/replies, xml ) Need Help??


in reply to How to deal with mixed encoding.

So - what is the encoding in the string as you read it in? What is the encoding of the HTML page where you need to display the string?

See Encode:

my $zeta_zeta = <>; # read the input from somewhere my $str = decode('Latin-1', $zeta_zeta); my $html = <<'HTML'; <html> <head> <meta charset="utf-8" /> </head> <body> Hello World HTML $html .= encode('UTF-8',$str); print $html;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-16 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found