![]() |
windows-1251 encoding
Hello all!
I would like to configure PhpDig, so that it can search pages with windows-1251 (cyrillic) encoding. I have viewed two similar threads in this forum, on questions of encoding, located here: ISO-8859-5 ISO-8859-7 The ISO-8859-7 thread is quite extensive, but to say the truth, I still have little clue on how to include windows-1251 encoding support into PhpDig... :bang: I have found a couple of pages on windows-1251 on these sites: http://www.sensi.org/~alec/locale/other/win1251.html http://www.cs.susu.ac.ru/RS6000/tbcp1251.html Would please anyone help me, how and which characters do I add to the: $phpdig_string_subst['windows-1251'] and $phpdig_words_chars['windows-1251'] Thank you very much!!! |
Windows-1251 Characters (note A0 is a space):
A0-AF _ Ў ў Ј ¤ Ґ ¦ § Ё © Є « ¬ _ ® Ї B0-BF ° ± І і ґ µ ¶ · ё № є » ј Ѕ ѕ ї C0-CF А Б В Г Д Е Ж З И Й К Л М Н О П D0-DF Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я E0-EF а б в г д е ж з и й к л м н о п F0-FF р с т у ф х ц ч ш щ ъ ы ь э ю я Those Characters in ASCII (note A0 is a space): A0-AF _ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ _ ® ¯ B0-BF ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ C0-CF À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï D0-DF Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß E0-EF * á â ã ä å æ ç è é ê ë ì * î ï F0-FF ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Then complete this table (I had to 'code' it to keep spacing): Code:
Latin Cyrillic Hex ASCII |
Hi. Here's a new approach/workaround for use with PhpDig 1.6.5.
In the config.php file set the following: PHP Code:
In the phpdigIndexFile function replace: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Also you will need to index from scratch for the changes to take effect. Please let me know how this method works for you. |
Happy New Year! :)
Thank you very much for your help! The windows-1251 solution that you have posted, works! But now I have 2 other questions: For exmaple, if I search for the 3 letter word (search link to which is given below) there's no highlighting being made for it: http://oasiswithin.net/search/search...rt&lim_start=0 My "config.php" contains the following settings: define('SMALL_WORDS_SIZE',2); And If I search for the word: http://oasiswithin.net/search/search...rt&lim_start=0 result number 2, also contains the words from the navigational menu, though this section should be excluded from being displayed, as I have the following settings in "config.php": define('PHPDIG_EXCLUDE_COMMENT','<!-- *************************************'); define('PHPDIG_INCLUDE_COMMENT','************************************** -->'); The content which should be considered for the search engine is located between these 2 comment lines. Or maybe I understood it wrong? And just to mention, the navigational section of the site is not contained in the content file which is being indexed, but is being included to this file via PHP include call, from an external .HTML file. Maybe it has to do something with this?.. Thank you! :) |
Hi. For the first part, it looks like the highlighting isn't picking up the case sensitivity. For this, try the following:
In the config.php file, replace: PHP Code:
PHP Code:
PHP Code:
Code:
<!-- ************************************* |
All times are GMT -8. The time now is 03:18 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.