Topic: Russian search is not working
Can you fix this?
I set
'lang_encoding' => 'windows-1251',
in en_common.php and russian letters is not HTML encoded in output HTML source code.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 bug reports → Russian search is not working
Can you fix this?
I set
'lang_encoding' => 'windows-1251',
in en_common.php and russian letters is not HTML encoded in output HTML source code.
Try rebuilding your search index in admin/maintenance.
I resolve the problem:
// Determine what locale to use
switch (PHP_OS)
{
case 'WINNT':
case 'WIN32':
$locale = 'russian';
break;
case 'FreeBSD':
case 'NetBSD':
case 'OpenBSD':
$locale = 'ru_RU.CP1251';
break;
default:
$locale = 'ru_RU';
break;
}
// Attempt to set the locale (required for fulltext indexing to work correctly)
setlocale(LC_CTYPE, $locale);
That should be in ru_common.php from the russian language packs. Isn't it there?
That should be in ru_common.php from the russian language packs. Isn't it there?
Yes. But I found russian language pack only for older forum version.
I use CP 1251 instead ISO8859-5 in original version.
Ok, cool.
hi
i have same problem with Arabic but not solved,
setting Locale to arabic as above and try
search_idx.php
preg_match_all('#\b([\w]+)\b#', $text, $components);
extract English word only ,take arabic word as non charater
php version 4.3.3
punbb 1.1.4
windows 2000
zaher: Are you sure the locale is getting set? Try setting it and then calling setlocale() with null for the locale parameter:
$before = setlocale(LC_ALL, null);
$after = setlocale(LC_ALL, 'your_locale_here');
Then echo out $before and $after to see if it has changed.
On my site Linux work good but
This test in home computer and work with win2000
$before = setlocale(LC_ALL, null);
$after = setlocale(LC_ALL, 'arabic');// or 'ar'
echo $before."\n";
echo $after."\n";
result
Arabic_Syria.1256
Arabic_Saudi Arabia.1256
but words exrtacted english only
Hmm, that's odd. I honestly don't know why that happens. I guess it's a problem with the PCRE library and Windows. I'll look around and see if I can find anything.
Look i test it in 3 server HOME win2000, ZAHER win2000, SERVER win2003
in HOME the test.php extract english Only and PunBB also
in Server the test.php extract english but PunBB work good even if setlocal to 'en' (i am sure using this code not another by trying write an error)
in ZAHER test.php extart english words but when setlocale to 'en' not 'ar'
will extact arabic word
I WILL loose my mind &-P
Let me know if you come up with something. I haven't found anything yet.
Have a look at the PHP manual page for setlocale. There are a few comments regarding Windows and non-us locales. Just ctrl+f after Windows and you will find them.
OK i will do.
I Have looked to it and search before post this in topic
as like i found this topic
i think its win2000 Problem.
Thanks
PunBB Forums → PunBB 1.2 bug reports → Russian search is not working
Powered by PunBB, supported by Informer Technologies, Inc.