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;