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 mikeh@minivend.com (mikeh@minivend.com):
> 
> 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.
> 

No, it doesn't work here on MiniVend. Try adding this line at line 264 of
Vend/TextSearch.pm:

	use locale;

I put it in MV4 and will do some tests to check for it...I might look
at my LC_.... settings in the setlocale routine as well. It is unclear
how far I should go in changing locale based on user settings, and I am
reworking it all anyway. I think I might have a settable array of the
LC_MONETARY, LANG, LC_CTYPE, and LC_COLLATE that can be accessed by
the new actions.

Also on the locale front, I am adding an auto-locale setting capability
with the Accept-Language: header, and I have added a setting that
looks for (German locale as example) index.de_DE over index.html if
that is the current locale.

-- 
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: