D
Daneel Yaitskov
Hi,
I started to learn CGI and wrote his first script. I have a problem with
charset of webpage. Referenceing to man help I wrote following code:
#!/usr/bin/perl -w
use utf8;
use encoding 'utf8';
use CGI qw
standard);
print header(-type=>'text/html', -charset=>'UTF-8');
print start_html('Simple example'),
h1('Simple example'), end_html();
The problem is that a browser gets the generated webpage with a wrong
charset. What do I make wrong?
header of webpage is:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Remote terminal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
......
I have sent this letter here, because my letters don't come to
perl.beginners.cgi. Does anyone know why so?
Daneel
I started to learn CGI and wrote his first script. I have a problem with
charset of webpage. Referenceing to man help I wrote following code:
#!/usr/bin/perl -w
use utf8;
use encoding 'utf8';
use CGI qw
print header(-type=>'text/html', -charset=>'UTF-8');
print start_html('Simple example'),
h1('Simple example'), end_html();
The problem is that a browser gets the generated webpage with a wrong
charset. What do I make wrong?
header of webpage is:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Remote terminal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
......
I have sent this letter here, because my letters don't come to
perl.beginners.cgi. Does anyone know why so?
Daneel