MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: Trouble with Search string! (uppercase/lowercase)



Quoting jojo@buchonline.net (jojo@buchonline.net):
> 
> Search for LLER -> FAILURE!
> 

Here is a little test program that checks this:

use POSIX;
use locale;

print "Current LC_CTYPE locale is ", setlocale(LC_CTYPE), "\n";
$string = 'MÜLLER';
$target = 'müller';

print $string =~ /$target/i ? 'YES' : 'No';
print "\n";

setlocale(LC_CTYPE, 'de_DE');
print "Current LC_CTYPE locale is ", setlocale(LC_CTYPE), "\n";

print $string =~ /$target/i ? 'YES' : 'No';
print "\n";


Works here. Try setting LC_CTYPE to the proper locale before
running MV.

-- 
Mike Heins                          http://www.minivend.com/  ___ 
                                    Internet Robotics        |_ _|____
                                    131 Willow Lane, Floor 2  | ||  _ \
It's a little-known fact            Oxford, OH  45056         | || |_) |
that the Y1K problem caused         <mikeh@minivend.com>     |___|  _ <
the Dark Ages. -- unknown           513.523.7621 FAX 7501        |_| \_\


Search for: Match: Format: Sort by: