I have googled this already, but I couldn't find what's wrong in my situation.

I have a wordpress site that has a lot of non-english users which type in words such as "español" it is printed correctly with php or sent via email, but when it's saved to the database, it appears as "espau00f1ol".

It's a MyISAM, mysql database with utf8mb4 unicode encoding. What do I need to change in order to be able to save non-English characters?

2 Answers 2


Check and log/dump the insert/update queries - this looks to me as if the php code somehow recodes your data. The 00f1 is the hexadecimal representation of the character ñ and in the form \u00f1 it might be used as an special/escape sequence (for example in JSON).


You have to change fields/tables encoding to utf8_spanish_ci or utf8_spanish2_ci so you can save spanish characters.

  • No, utf8 is enough for that. Collation is only for ordering and comparison of characters, but does not change what can be stored.
    – jkavalik
    Commented Feb 5, 2016 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.