Forum Moderators: open
I am developing a cgi-script based web-page and printing the results on a html page. Following line is being used for that.
print $queryForm->header("text/html\n\n");
print $queryForm->start_html( -title => "Some try", -bgcolor => "#FFFFFF", -text => 'black');
print "<meta http-equiv=\"Content-Type:text/html \" >\n";
The page works perfectly and shows every thing in proper format, except that on the left top corner of the page, following chars appear:
;charset=ISO-8859-1
Can you some one tell me how to get rid of these chars on the page?
Thanks and regards,
Yateen V. Joshi
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
you need to change your print instruction, yet again,
from:
print "<meta http-equiv=\"Content-Type:text/html; charset=ISO-8859-1\">\n";
to be:
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n"; instead.
Make sure that you also delete the unnecessary colon between Content-Type and text/html from your old version, as well.
If there is any other occurrance of the words ;charset=ISO-8859-1 anywhere nearby, then remove that copy from your code.
The correct thing I could figure out after some more
efforts is simple.
Perl5.6 does not do proper checks for 'breaks' in the header
Hence, following was creating the problem.
print $page->header("text/html\n\n");
Instead of this, if one uses
print $page->header("text/html");
or simply,
print $page->header;
This error is gone even if one is using perl 5.6.
I have not put any other statement including meta and
content type etc, but the error is gone and pages are
working fine!
Thanks for every one's inputs.
Regards,
Yateen V. Joshi