I have problems when adding the Swedish National Characters ÅÄÖ in the alphabet of the Reviews module, but it works on my local site on my PC with Xampp, but it does not work on the webb hotel with the identical index.php.
When I click on Ä in the local site, I can see the books that starts with this letter.
When I click on Ä on the web hotel, I just can see the index-page again. Nothing happens, but the other letters like V works normally and displays books that starts with V.
I have checked the database query and it works for the web hotell and displays books for letter Ä.
It seems that it must be the php-code that are triggered by clicking on Ä that is not working because it is a non-english letter.
case "reviewer":
$result = $db->sql_query("SELECT id, title, hits, reviewer, score, email FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by reviewer $order");
break;
case "score":
$result = $db->sql_query("SELECT id, title, hits, reviewer, score, email FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by score $order");
break;
case "hits":
$result = $db->sql_query("SELECT id, title, hits, reviewer, score, email FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by hits $order");
break;
default:
$result = $db->sql_query("SELECT id, title, hits, reviewer, score, email FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by title $order");
break;
The database is latin-1 and identical. The database query for the letter Ä worked very well in both cases. I think it must be a php issue and the step prior the database is not working OK.
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Wed Nov 18, 2009 5:08 am
In that case, I don't know the answer. I'm actually building a test site at the moment to use strictly utf-8 in order to research these sorts of problems but it seems to me that the character your using isn't in the latin-1 or iso character set but don't have a clue as to if it's mySQL that has a problem with the character or PHP.
It seems to be a difficult problem to solve, but your help is highly appreciated. When I click on Ä at the web hotel I can see Ä in the URL all right, but the page with the book starting with Ä does not show up, but instead the index page.
I have tried to use utf8_decode like this:
default:
$letter = utf8_decode($letter);
$result = $db->sql_query("SELECT id, title, hits, reviewer, score, email FROM ".$prefix."_reviews WHERE UPPER(title) LIKE '$letter%' $querylang ORDER by title $order");
break;
This would have change the letter from utf8 to iso8859, but this does not change anything. It must be letter Ä that is disturbing some how, because normal letters works OK.
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Thu Nov 19, 2009 5:09 am
So this character is in a book title.
It would be worth checking to see if the character is seen as it really is or an htmlentity when you look at the page source for that review and also, see what is stored in the DB.
It seems to me that the reason the search fails is because the character doesn't match what is being searched for, so somewhere, there is a mis-match, it just a question of finding it.
I have looked in the database and the characters are correct and Ä. Also if I make the database query it will find the correct book that starts with Ä.
I think it must be a php issue with Ä and possible alternative is $letter or $title in index.php.
I could not get it working, but instead I had to use Reviews Plus module
Only registered users can see links on this board! Get registered or login to the forums!
I have a small problem with this module and the rights block are showing up, despite I have changed in index.php to:
Code:
$index = 0; //Turn Right Blocks On (1) or Off (0) / Bloques Derechos Activos (1) o Inactivos (0); For 7.7 patched 3.1 or earlier version.
define('INDEX_FILE', false); // Turn Right Blocks On (true) or Off (false) / Bloques Derechos Activos (true) o Inactivos (false); For 7.8 Patched 3.1 or newer version
define('IN_RPM', false);
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum