Pavel Straka
Pavel Straka

Reputation: 427

CKeditor - bad utf8 encoding

I would like to ask for help with this problem:

I have been using ckeditor for long time, but few weeks ago i realized that there is some problem with UTF8 encoding. I have correctly set UTF8 encoding in meta tag and in MySQL DB, too (there is set utf8_czech_ci).

For example, for input "ě š č ř ž" is output (saved to DB) "Ä› Å¡ Ä Å™ ž"

Where could be the problem?

Thank You

Upvotes: 2

Views: 4054

Answers (2)

marciomof
marciomof

Reputation: 11

$var = trim(html_entity_decode($var, ENT_COMPAT, "UTF-8"));

Upvotes: 1

Edson Perotoni
Edson Perotoni

Reputation: 131

If you want, you can use:

CKEDITOR.config.entities_processNumerical = 'force'; //Whether to convert all remaining characters not included in the ASCII character table to their relative decimal numeric representation of HTML entity. When set to force, it will convert all entities into this format. For example : 汉语."

It will to convert "ě š č ř ž" to & # 34; & # 283; & # 353; & # 269; & # 345; & # 382; & # 34;

Upvotes: 0

Related Questions