My problem is my API server can not store a character which is possible to display on iOS client. The character is 1F49D
(http://shapecatcher.com/unicode/info/128157).
Server side:
FYI:
irb
. Ruby 1.9 is possible to read and understand this character.utf8
and utf16
. But it does not work.Anyone can give me an advice how to persist/retreive this text to/from mysql?
Prerequisite: MySQL >= 5.5.3
Character set named utf8 (or utf8mb3) uses a maximum of three bytes per character and contains only BMP characters. In order to have a maximum of four bytes per character, you need to:
encoding: utf8
lines to encoding: utf8mb4
(and a recent mysql2 gem?)