For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > May 2004 > CGI and special characters









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 CGI and special characters
Howard Fuchs

2004-05-22, 11:30 am

Hi all:

Here is my problem. I have a script which processes input from a
textarea which may have 'special characters' in it like ‘ or ’ etc.
Unfortunately what I am getting back are these ‘ or ’ respectively.

Script snippet start------------------

use CGI qw/:standard/;


print "Content-type: text/html\n\n";
$c = new CGI;
$ta = $c->param('ta');


open (TIDYFILE,">c:/tmp/tidied.html");
print TIDYFILE $ta;
close (TIDYFILE);


Script snippet end------------------

Any help appreciated.

Howard

Sponsored Links







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

Copyright 2008 codecomments.com