VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: wojt3k9 on October 27, 2011, 11:02:05 AM

Title: [SOLVED]Problem with polish diacritic characters in search module
Post by: wojt3k9 on October 27, 2011, 11:02:05 AM
Hi,
I found a problem when I try to find products with polish diacritic characters in name. Those characters are just removed from searching word, e.g. I type word: 'piĆ³ro' but search results are for word 'piro'. 
Any ideas, what can cause this problem?
I use Joomla 1.7.1 and VM2 J



//Edit
OK I solved a problem. I figured it out that joomla getWord function is causing this problem. I replaced getWord to getVar in category/view.html.php and models/product.php and it works.
Btw
It's realy strage because getWord is only proxy function to getVar. Code of getWord function: public static function getWord($name, $default = '', $hash = 'default')
{// Deprecation warning.
JLog::add('JRequest::getWord is deprecated.', JLog::WARNING, 'deprecated');
return self::getVar($name, $default, $hash, 'word');
}

so I'm not sure why it works but i'm happy;)
Title: Re: [SOLVED]Problem with polish diacritic characters in search module
Post by: Milbo on October 27, 2011, 23:29:49 PM
You should use getString, but we create atm our own function for this. Getvar is too unsecure, getString is also not the best.