For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > February 2007 > Problem with displaying 8859-2 charset with cgi->header









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with displaying 8859-2 charset with cgi->header
Slawomir Orlowski

2007-02-07, 6:55 pm

Hello,



I have Linux RHEL v4, apache web server 2.0.52-28.ent



[root@sapphire cgi-bin]# perl -MCGI -e 'print $CGI::VERSION'

3.05

[root@sapphire cgi-bin]# perl -v

This is perl, v5.8.5 built for i386-linux-thread-multi



I'm having problem with displaying polish fonts on web page..



When in perl script I put :



print "Content-type: text/html; charset=iso-8859-2\n\n";



everything is OK.



but when in perl script:



use CGI qw(:standard);



my $cgi=new CGI;

print
$cgi->header(-type=>"text/html",-charset=>"iso-8859-2",-cookie=>$cookie);
(*)

I have garbled fonts on my screen.



When used :

print $cgi->header(-type=>"text/html",-cookie=>$cookie);

they are garbled too but in different way.



I need to use (*) because I'm using cookie.



Please help if you can.

Regards

Slawomir Orlowski






Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com