UTF8 != UTF8

Kommentieren Jan 05 2016 .txt, .json, .md

Bah…

Wer Probleme mit den Emojis in UTF-8 hat der sollte sich mal seine DB anschauen in der die Daten abgelegt werden. In diesem Fall ist es MySQL und MariaDB

https://www.reddit.com/r/PHP/comments/3fvi0u/emojis_are_breaking_our_json_decodes_help/

Another thing to watch out for is MySQL if you are using it to store the utf8. The ‘utf8’ encoding is only 3 bytes. It truncates a string silently starting at the first 4 byte character. Most (all?) emoji are 4 bytes. You’ll need to use ‘utf8mb4’ encoding.

Und was macht MySQL und MariaDB? Ne, nicht den Standart einhalten, Einfach noch ein Charset einführen… https://mariadb.com/kb/en/mariadb/unicode/

utf8mb4 – Same as utf8, but stores supplementary characters in four bytes.

utf8 – UTF-8 encoding using one to three bytes per character. Basic Latin letters, numbers and punctuation use one byte. European and Middle East letters mostly fit into 2 bytes. Korean, Chinese, and Japanese ideographs use 3-bytes. No supplementary characters are stored.