| Konstantin Rekk 2006-06-24, 7:56 am |
| Hello,
I am struggling to get utf-8 output to the browser,
this little snippet gives strange results:
(
perl -v
This is perl, v5.8.7 built for i586-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
)
------------------------------- utf_test.cgi ---------
#!/usr/bin/perl
use utf8;
use CGI qw(:all);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser) ;
$cgi=new CGI;
print "Content-type: text/html; charset=utf-8\n\n";
print "<html><head><title>Simple utf-8 test</title><meta http-equiv=
\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body>Ü Ä
Ö</body></html>";
-------------------------------------------------
the source code of html-output in firefox:
<html><head><title>Simple utf-8 test</title><meta
http-equiv="Content-Type" content="text/html;
charset=utf-8"></head><body>� � �</body></html>
Cant figure out whats wrong.
Thanks, Konstantin
|