0

We are using PHP 5 with CakePHP 2, and MySql 5.6 with Wamp.

When we try to insert a string with some symbols like this: "ʡ" (Epiglottal stop), the query for inserting is recognizing the symbol.
The problem is after we insert in the database where it shows as "?", but the database is already UTF-8 as the table and column.

I've tested this same symbol in another MySQL database with UTF-8 and it is inserting correctly. So the problem is not UTF8mb4, it is something else.

Thanks in advance.

Sachith Muhandiram
  • 2,819
  • 10
  • 45
  • 94
Jean da Silva
  • 11
  • 1
  • 2
  • 1
    is the connection charset set to `utf8` as well? – Federkun Dec 05 '16 at 16:52
  • 1
    **1.** How are you inserting the code? **2.** Is the table set to UTF8? **3.** Is the front end form page set to UTF8? – Praveen Kumar Purushothaman Dec 05 '16 at 16:52
  • 2
    **4.** is the whole thing UTF-8... as in ["all the way"?](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Funk Forty Niner Dec 05 '16 at 16:54
  • 1
    To expand on what Fred is saying, UTF-8 means your entire software ecosystem, not just one component, has to be UTF-8 for it to work. If even one part isn't using it, you'll have all sorts of messes – Machavity Dec 05 '16 at 16:58
  • thanks for the replies guys. **1.** I've checked the HTML header and it is utf-8. **2.** In the database.php the configuration of encoding is utf-8. **3.** The table is utf8_default_collation. We tried changing to utf8_unicode_ci or utf8mb4_unicode_ci. – Jean da Silva Dec 05 '16 at 17:31
  • 1
    Thank you for the replies but it was a really easy problem to solve. I've copied the database and found that the column wasn't in utf8, so my bad for no seeing. Thanks for the help :) – Jean da Silva Dec 05 '16 at 18:36

0 Answers0