[Israel.pm] UTF8 in CGI form parameter

Peter Gordon peter at pg-consultants.com
Sun Mar 16 11:16:18 EET 2008


HI Shmuel,

Do you have control over the pages? If so, you could change them to
utf-8, so the problem would go away.

Otherwise I don't know how cp1255 strings are converted.

Peter


On Fri, 2008-03-14 at 15:28 +0200, Shmuel Fomberg wrote:
> Hi Peter.
> 
> There isn't much document about this function. And looking at the code of
> CGI.pm, it seen that it is effective only for utf8 forms. (from the param
> function) all other encodings, for example cp1255, will not be handled.
> (When I say "handled" I mean that the input strings will be auto converted
> to Perl's internal utf8)
> Am I right, or do I miss something?
> 
> Thanks,
> Shmuel.
> 
> >From: Peter Gordon
> >Sent: Thursday, March 13, 2008 11:05 AM
> >
> >my $q = new CGI ;
> >$q->charset('utf-8') ;
> >
> >
> >On Wed, 2008-03-12 at 21:45 +0200, Shmuel Fomberg wrote:
> >> Hello there.
> >>
> >> When I send a utf8 page to the browser, and get the response in utf8,
> >does
> >> CGI.pm identify it and mark the data as utf8, or should I do it?
> >>
> >> (I can do it using Encoding's $string = decode_utf8($octets) )
> >>
> >> Shmuel.
> >>
> >> _______________________________________________
> >> Perl mailing list
> >> Perl at perl.org.il
> >> http://perl.org.il/mailman/listinfo/perl
> >
> >_______________________________________________
> >Perl mailing list
> >Perl at perl.org.il
> >http://perl.org.il/mailman/listinfo/perl
> >
> >
> >--
> >No virus found in this incoming message.
> >Checked by AVG.
> >Version: 7.5.519 / Virus Database: 269.21.7/1328 - Release Date: 13/03/2008
> >11:31
> 
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl



More information about the Perl mailing list