I converted my MySQL database and my perl scripts to UTF-8. And finally it worked, but it is somehow a crazy solution. That's what I did:
MYSQL DATABASE: Completely set to UTF8
PERL-SCRIPTS: Source code converted to UTF8 encoding. "use utf8;" at the top.
HTML-HEADERS:
print "Content-type: text/html\n\n";
and
<META CHARSET='UTF-8'>
DATABASE-CONNECTS:
$dbh->{'mysql_enable_utf8'} = 1;
and
"set names 'utf8';"
Now, everything works with cyrillic (russian) characters: input, output and processing in the database, fine. But the problem I have are German "Umlaute": äöü. They are not shown correctly in the browser. They work only if I put a cyrillic character in a comment next to the HTML element which does not show the character, e.g. something like this:
<!-- Э -->
This is an awkward solutions, and I know that there has to be a solution without that. Does anybody know what could be missing. Thanks in advance for every answer!
UPDATE:
Thank you for you response. I figured out, that I have the problem even with the most simple HTML file. I use this source code:
#!/usr/bin/perl
use utf8;
print "Content-Type: text/html; charset=utf-8\n\n";
print <<END;
<HTML>
<HEAD>
<META CHARSET='UTF-8'>
</HEAD>
<BODY>
<H1>The Country Österreich</H1>
</BODY>
</HTML>
END
The result can be seen at:
http://5mls.com/test_bad.cgi
As you can see, the "Ö" is not shown.
Now the code that works:
#!/usr/bin/perl
use utf8;
print "Content-Type: text/html; charset=utf-8\n\n";
print <<END;
<HTML>
<HEAD>
<META CHARSET='UTF-8'>
</HEAD>
<BODY>
<H1>The Country Österreich<!-- Э --></H1>
</BODY>
</HTML>
END
The result can be seen at:
http://5mls.com/test_good.cgi
This time the "Ö" is shown correctly, because of the Russian character "Э" in the comment. Does anybody know, how the "Ö" could be shown without the Russian character?