Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hi, I have a problem sending hebrew characters to a cgi. the cgi sits on a linux server and the characters get crazy. do you know about a way to convert it so it will get it ok. thank's

Replies are listed 'Best First'.
Re: send hebrew to cgi
by Ovid (Cardinal) on Jul 21, 2002 at 17:06 UTC

    I don't have a lot of experience in this area, but I see that no one else has answered, so I'll take a swing at it.

    First, you should probably post a small snippet of the code that fails so that we can actually see what's going on. It's tough to debug invisible code. Second, it may be the case that your Perl script simply needs to have the locale set. Further, I pulled this snippet from the Perl Cookbook, so if you have a copy, see page 188.

    use locale; use POSIX 'locale_h'; setlocale( LC_CTYPE, 'hebrew.ISO_8859_8_i');

    Actually, I'm sure the locale information in the last line is not correct. You'll have to look up how to set it on your system. See locale and perllocale for more information.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.