[Israel.pm] Hebrew with CGI

Omer Zak omerz at actcom.co.il
Mon Jun 27 15:10:00 PDT 2005

1. What does your server log say? (It should write something to the log
whenever it responds with HTTP 500 error.)
2. Use a lower level module than CGI (or a callback function from CGI)
and add a function, which translates the URL string from %uXXXX based
one into %hh%hh based?
                                                           --- Omer

On Tue, 2005-06-28 at 00:37 +0200, Guy Malachi wrote:
> I can't really do that because the requests to my script come from bookmarklets that people run on various sites. The Hebrew that is passed is because the bookmarklet is run on a site that has a title in Hebrew.
> Basically people have a link the looks like this:
> <a href="javascript:document.location.href='http://mysite.com/myscript.pl?str= '+encodeURIComponent(document.title)">send site</a>
> -----Original Message-----
> From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf Of Omer Zak
> Sent: Monday, June 27, 2005 10:53 PM
> To: Perl in Israel
> Subject: Re: [Israel.pm] Hebrew with CGI
> Try %D7%99 (obtained by encoding the string first to UTF-8 and then
> using the appropriate JavaScript encoding function).
>                                                        --- Omer
> On Mon, 2005-06-27 at 23:17 +0200, Guy Malachi wrote:
> > Hey guys,
> > I am trying to call my CGI script with a url like this:
> > http://mysite.com/myscript.pl?str=%u05D9
> > 
> > As soon as my script gets a "%u" in the URL it crashes (I get an HTTP 500 error).
> > Anybody have an idea how I can make this work?
> > 
> > BTW: the %u05D9 is created by encoding a string that has Hebrew characters in it by using JavaScript's encodeURIComponent.
> > 
> > My script is a simple CGI script that looks something like this:
> > 
> > use CGI;
> > my $q=new CGI;
> > print $q->header();
> > 
> > my $str=$q->param('str');
> > #do something with $str

Jara Cimerman!  He is one of the unsung geniuses--scientist, engineer,
inventor and literary critic.
My own blog is at http://www.livejournal.com/users/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html

More information about the Perl mailing list