Have a Question?

Categories

Joomla 1.5 and MariaDb – Collation problem

You are here:
< All topics
Table of contents

We found the hard way that all Joomla 1.5 ( yes there are still joomla 1.5 )  have problem with the collation of the database when you use  UTF 8 characters . After several experiments with collation we found in some blogs that the anwer is pretty easy. You have to change a line in the mysqli file in Joomla.

in  libraries/joomla/database/database/mysql.php

or (depending on your setting)

libraries/joomla/database/database/mysqli.php

comment the line 186

return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));

and add this instead (assuming these days you’ll have unicode supported database):

return 1;

the code looks like:

function hasUTF()
{
$verParts = explode( ‘.’, $this->getVersion() );
//  return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
return (1);
}

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we correct this article?
Please submit the reason for your vote so that we can improve the article.
Previous Install Redmine