I'm migrating a project from a CMS called "Freekore" to CodeIgniter, with my old CMS I didn't have this problem but with CI I can't figure out why I have problems with special characters as ñ,á,é,í
etc.
I think I've tried everything.
I got this in header
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
also added this
<?php header('Content-Type: text/html; charset=UTF-8'); ?>
on database config
$db['local']['char_set'] = 'utf8';
$db['local']['dbcollat'] = 'utf8_general_ci';
and on config file
$config['charset'] = 'UTF-8';
But I still get this
COMUNICACIÓN Y PRODUCCIÓN EDITORIAL
instead of this
COMUNICACIÓN Y PRODUCCIÓN EDITORIAL
ah and also added this to .htaccess
AddDefaultCharset UTF-8
Edit
Using this I found out that Current character set is latin1
but how? I've checked database and tables and are utf8_general_ci
Edit 2
I did a new database and checked every column collation, now I'm using utf8_unicode_ci
on the database, on every table and on ever row, but I still have the same problem Current character set is latin1
Edit 3
I decided to use utf8_decode
and seemed to work but I still have problems with uppercases
", "", $data); $data = str_replace("
", "", $data); $data = str_replace("
", "", $data); $data = str_replace(" ", " ", $data); – Alex Aug 12 '14 at 23:05