I’ve been trying to fix this for three days now and any help is appreciated.
When I Publish / Edit an entry (using default control panel theme) I’m facing character encoding issues.
File Encoding
I’ve checked all the view files, controllers, modules, helpers etc. All these files have UTF8 set as file encoding not ANSI.
Database Encoding
I’ve checked the database, table, and column encodings and collations. All are set tu utf8 and utf8_general_ci
Database Connection Encoding
I have modified mysql driver so that it manually sets character encoding using SET NAMES directive.
HTML Encoding
I have fixed HTML encoding and it has this line:
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”/>
I even added charset accept-charset=“utf-8” to the form_open in EE Form Helper class.
Nothing solved my problem.
Then I have checked the content of $_POST variable by adding
print_R($_POST); exit;on line 134 of /system/expressionengine/controllers/cp/content_publish.php
Now if I enter ççç into title field I get this output:
Array
(
.
.
.
[title] => ççç
.
.
.
)So basically there is an issue with character encoding and $_POST variable.
I have checked charset directives in php.ini and set them all to UTF8.
I have added default charset into Apache configuration file..
I am out of ideas.
Any help is really much appreciated.
Thanks,
Can Berkol
** edit:
When I enter data using non EE HTML Forms or phpmyadmin data is saved into DB correctly with no encoding issues.