set names utf8 Topic is solved

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
newclear

set names utf8

Post by newclear »

Hello,
I just started looking the CMSms code. its not so easy for me (like a developer) to understand how the structure of the classes is generated to create this really simple to use CMS.

That's what I tried to do was to just 'set names utf8' to mysql server. I solve my problem but I lose 2 hours to understand how to use adodb and where to put my 2 lines of code.

So the solution is:
on file include.php, line 142 add theese lines:

$db_set=$gCms->GetDb();
$db_set->Execute('set names utf8');

I hope you will create better way to control the encoding in the future release of CMSms.

My questions here are:
Are theese lines included in both frontend and admin site of CMSms and are they the first query to the mysql server?

Best regards for the great work.
Sonya

Re: set names utf8

Post by Sonya »

newclear wrote:
I hope you will create better way to control the encoding in the future release of CMSms.
I've run in the same problem. I read that CMSMS is utf-8 and I do not have to change anything. My fault. I have written down my content and let user to add a lot of comments. My content was not stored with utf-8 in database. Now I have to export the content-related tables, change table encoding in utf-8 and then import the content again. It's a lot of work for me.

Please, make clear in your documentation that only source files are in utf-8. Database encoding has to be changed before installation. And if you are on the shared server and cannot edit my.cnf then you have to add the 2 lines from the previous post to be able to save and read utf-8 content.

Thank you!
PS. And I still love CMSMS  ;)
Post Reply

Return to “CMSMS Core”