Welcome Guest, Not a member yet? Register   Sign In
MySQL latin1 to UTF8 site
#1
Exclamation 

Hello,

I begin on CI. Before I used PDO to make queries.
The MySQL tables used to have latin1 charset and the site used the utf8 charset meta tag.

When I wanted to insert or retrieve datas there was no problems, without configuration.

Today, with CI I tried some solutions without success, like :

put this in the index.php and let defaults parameters in config/database.php (utf8)
PHP Code:
header('Content-Type: text/html; charset=utf-8'true); 

or

modify config/database.php like this
PHP Code:
$db['default']['char_set'] = 'latin1';
$db['default']['dbcollat'] = 'latin1_swedish_ci'

I would like to keep database's charset in latin1 and display datas in UTF8.

Thanks for your help.

PS: Sorry for my bad english.
Reply


Messages In This Thread
MySQL latin1 to UTF8 site - by miko91 - 12-13-2014, 05:33 PM
RE: MySQL latin1 to UTF8 site - by includebeer - 12-13-2014, 06:03 PM
RE: MySQL latin1 to UTF8 site - by miko91 - 12-13-2014, 06:53 PM
RE: MySQL latin1 to UTF8 site - by Rufnex - 12-14-2014, 02:34 AM
RE: MySQL latin1 to UTF8 site - by includebeer - 12-14-2014, 04:53 AM
RE: MySQL latin1 to UTF8 site - by miko91 - 12-14-2014, 07:01 AM
RE: MySQL latin1 to UTF8 site - by includebeer - 12-14-2014, 07:47 AM
RE: MySQL latin1 to UTF8 site - by Rufnex - 12-14-2014, 07:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB