MySQL

MySQL - utf8 is not really utf8

Turns out that utf8 is not really utf8. I was using Drupal 7 and MySQL and started to encounter a strange error when saving some captured user input. This was the reported error symptom

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x98\x8D H...' for column 'field_raw_content_value' at row 1

 

A quick Google search led me (incorrectly) down the path of trying to "clean" my data. My assumption was that the end user was somehow providing corrupt utf8 data. A few sample hits are:

Subscribe to RSS - MySQL