[Israel.pm] Hebrew with CGI

Guy Malachi guy at ucmore.com
Mon Jun 27 15:37:34 PDT 2005

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.  A name to remember.
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

Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list