|
|||||||||||||||||||||||||||
hejsa jeg har følgende kode, men jeg ønsker ikke at det skal fjerne
ÆØÅæøå !
hvordan rettes det til så det ikke gør dette?
sub ReadParse {
local (*in) = @_ if @_;
local ($i, $key, $val);
# Read in text
if ($ENV{'REQUEST_METHOD'} eq "GET") {
$in = $ENV{'QUERY_STRING'};
} elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
}
@in = split(/[&;]/,$in);
foreach $i (0 .. $#in) {
# Convert plus's to spaces
$in[$i] =~ s/\+/ /g;
# Split into key and value.
($key, $val) = split(/=/,$in[$i],2); # splits on the first =.
# Convert %XX from hex numbers to alphanumeric
$key =~ s/%(..)/pack("c",hex($1))/ge;
$val =~ s/%(..)/pack("c",hex($1))/ge;
# Associate key and value
$in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple
separator
$in{$key} .= $val;
# Remove any objectionable characters. -vm
$in{$key} =~ s/[^A-Z0-9\.!?\$ ,'"<>@\/~:+=\-()\*\n]//gio;
}
return scalar(@in);
}
--
-
MVH
Kim schulz
========================================================================
| ADICT Kode Slave - www.adict.net |
| Dansk Linux Link Database - www.LinuXia.dk |
========================================================================
Sleep is just a cheap substitute for coffee
Fast, reliable, cheap - pick any two - [Microsoft in a Nutshell]
|
||||||||||||||
|
||||||||||||||