Joomla 1.5 and unicode databse
I have a server which (unfortunately) have tens of joomla 1.5 websites, After upgrade from Mysql to Mariadb 10 , all of the unicode texts are being displayed as question marks (i.e. ?????? ????), I looked into the databases , the data seems to be intact, even I moved some of them to another server with mariadb 5.6 which "seems" ok. It seems to be a driver/configuration issue.
It works on later versions of joomla (2.5& 3.x) versions. It seems mariadb should also be compatible with joomla 1.5 In the joomla system information it says: Database Version: 10.0.20-MariaDB Database Collation: N/A (mySQL < 4.1.2) PHP Version: 5.4.41 Web Server: Apache Web Server to PHP interface: cgi-fcgi Joomla! Version: Joomla! 1.5.26 Stable [ senu takaa ama busani ] 27-March-2012 18:00 GMT User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
Any help would be greatly appreciated , as I'm going to upgrade my other servers to mariadb.
Best
Answer Answered by Ali Jam in this comment.
I asked but no answers so I inspected and found the issue, I post here so if anyone needs to benefit the mariadb 10 for even older and non-supported versions can use this quick fix.
hope it helps
in
libraries/joomla/database/database/mysql.php
or (depending on your setting)
ibraries/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); }
Best