[Israel.pm] handling HTML forms

Shlomo Yona shlomo at cs.haifa.ac.il
Thu Aug 19 06:41:00 PDT 2004


Hello,

I have a web page with a form that has a textarea and a
submit button. The form is used to send Hebrew text to a CGI
script.

The page is hosted on an apache server which has some
setting (so I've been told) that assumes UTF-8 on all
incomming and outgoing data.

Problem is, I need the users to send the text in CP1255 and
I'd like them to view the response in the same encoding.

For some reason, I cannot find a way to be able to do this
properly without forcing the user to manually set the
encoding of the browser to CP1255 (or windows hebrew on IE)
before submitting the text and then again after receiving
the response.

Any suggestions? In particular, is there any magic I can do
in my CGI script to properly decode the data? The current
situation is that unless the user changes encoding the data
arriving to the CGI is corrupted.

Thanks.

-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/



More information about the Perl mailing list