PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 01-05-2005, 08:39 PM   #1
starks
Green Mole
 
Join Date: Jan 2005
Posts: 3
Encoding Problem

Hello,

I just installed phpdig and like it a lot. But I'm having problems implementing the ISO-8859-9 encoding. I searched the forum and found some threads on this subject but they were quite old. Since there are some new versions available, I was wondering if the way to add them is still the same.

I looked at this thread but I'm confused.

Mr Charter says...

Quote:
In the config file, the variable $phpdig_string_subst['iso-8859-1'] has the letter A followed by the colon and then other letter A's with accents. For example A:ÀÁÂÃÄÅ and so forth.

Try making $phpdig_string_subst['iso-8859-5'] in the same form as $phpdig_string_subst['iso-8859-1'] and $phpdig_string_subst['iso-8859-2'].

So, do I just add only the characters that are not available in other character sets?

For example, should I create line something like this?

$phpdig_string_subst['iso-8859-9'] = 'put the different characters here';

I don't understand the purpose of the colons. If somebody can show me for just one character, I think I can go from there.

Thank you.
starks is offline   Reply With Quote
Old 01-05-2005, 11:06 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Remove any spaces in each line, and try using the following in the config file.
Code:
define('PHPDIG_ENCODING','iso-8859-9');

$phpdig_string_subst['iso-8859-9'] = '*:À,á:Á,â:Â,ã:Ã,ä:Ä,å:Å,æ:Æ,ç:Ç,è:È,é:É,ê:Ê,ë:Ë,ì:Ì,*:Í,î:Î,ï:Ï,ð:Ð,ñ:Ñ,ò:Ò,ó:Ó,ô:Ô,õ:Õ,ö:Ö,÷:×,ø:Ø,ù:Ù,ú:Ú,û:Û,ü:Ü,ý:Ý,þ:Þ,ÿ:ß';

$phpdig_words_chars['iso-8859-9'] = '[:alnum:]ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß*áâãäåæçèéêëì*îïðñòóôõö÷øùúûüýþÿ';
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 01-06-2005, 12:26 AM   #3
starks
Green Mole
 
Join Date: Jan 2005
Posts: 3
Thank you very much! It worked great except for one thing.

When I insert "define('PHPDIG_ENCODING','iso-8859-9');" , encoding problem is totally gone, but search can not find most of the results. When I change it to 8859-1 and search with the same keyword, it finds a lot of results.

Could it because I indexed using 8859-1? Would it help if I clear the index and make another one by using 8859-9? Or is that irrelevant?

Again, thank you so much.
starks is offline   Reply With Quote
Old 01-06-2005, 02:21 PM   #4
starks
Green Mole
 
Join Date: Jan 2005
Posts: 3
After further inspection I found out that the above problem occurs only when more than one keyword is entered.

For example, if I enter "bruce", it works great. But if I enter "bruce campbell", then it does not find anything. (finds a lot with 8859-1). I looked at the admin panel >last search queries and it shows the keyword as this: bruceòcampbell

So, it somehow converts the space character to the "ò" character, thus it can't find any results.
starks is offline   Reply With Quote
Old 01-06-2005, 06:12 PM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
The issue may be that you indexed using iso-8859-1 but now want search results displayed as iso-8859-9 so try a reindex and search on a site that is encoded iso-8859-9, and set PhpDig to use iso-8859-9 for everything.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoding Problem. Please help Paka76 How-to Forum 0 01-04-2006 06:15 AM
Is this a character encoding problem ? casimiro Troubleshooting 0 12-22-2005 07:39 AM
keywords in windows-1251 encoding miscellone Mod Submissions 0 01-29-2004 01:26 AM
Japanese encoding : charset=shift_jis Edomondo How-to Forum 27 01-27-2004 06:04 AM
windows-1251 encoding jvalej How-to Forum 4 01-02-2004 08:51 AM


All times are GMT -8. The time now is 11:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.