Skip to main content.
home | support | download

Back to List Archive

Scandinavian characters

From: Mikael Niku <mikael.niku(at)not-real.helsinki.fi>
Date: Wed Nov 07 2001 - 13:41:32 GMT
Hello!

I'm bothering you with a question that is probably very
simple to anyone knowin Perl:

I succesfully set up SWISH-E on my www site. Everything
is working well - except that the example CGI script
provided at http://www.cgi101.com/help/swish.html
doesn't like scandinavian characters. Command-line
SWISH-E search has no problems with that.

I never had time to learn Perl, and couldn't fix this
by tinkering the script code. I'd be very grateful if
someone could help me out!

I guess the relevant part of the code is the following:

$keystring = $FORM{'keywords'};
if ($keystring =~ /^([\w\-\. ]+)$/ ) {
    $topic = $1;
} else {
    &dienice("Bad keyword: `$topic'.  Please don't use commas or
non-alphanumeric characters.");
}

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
   Mikael Niku             URL: www.helsinki.fi/~mniku/
   University of Helsinki  Dept. Basic Veterinary Sciences
       - Mitäkö mieltä olen länsimaisesta sivistyksestä?
         Minusta se olisi erinomainen ajatus!
                                              - Gandhi
////////////////////////////////////////////////////////////
Received on Wed Nov 7 13:42:06 2001