Forums / General / ezlocale, initPHP, PHP setlocale
Plamen Petkov
Monday 16 February 2004 1:48:53 am
Hi,
While testing the ez search engine, I found problems searching cyrillic text case insensitive (and other strange problems like geting search result consisting of ALL nodes in the content tree; but this is another story). Diging out ezsearchengine, ezlocale etc, I can not found any call to ezlocale.php:initPHP(), where is the actual call to PHP function setlocale(). setlocale() must be called with appropriate locale info in order PHP to be able to compare/sort etc.
I put a call to initPHP() in <ezroot>/index.php and now it is OK.
Is this the right aproach or not ?
Here is: OS: FreeBSD 4-STABLE Latest EZpublish Latest PHP 4.X Apache 1.3.XMySQL 3.XX
regards,plamendp
Jan Borsodi
Thursday 04 March 2004 4:51:04 am
The problem with setlocale is that it relies entirely up on the locale handling of PHP which doesn't separate charset from locale settings.It will probably work on some locales but we can never be sure.
Perhaps we should enable this by default?
-- Amos Documentation: http://ez.no/ez_publish/documentation FAQ: http://ez.no/ez_publish/documentation/faq