Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEmoji totally breaks comments #35
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
steveklabnik
commented
Nov 5, 2012
|
This comment has |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jcs
Nov 5, 2012
Contributor
I just looked in the database and there are no characters in the table after "A big ".
mysql> select comment, length(comment) from comments where short_id = 'mppo6p';
+-------------+-----------------+
| comment | length(comment) |
+-------------+-----------------+
| Yep. A big | 11 |
+-------------+-----------------+
I can see the full text of the comment in the production.log, and it's obviously making its way to the e-mail notification, but getting truncated at the point where \xf0\x9f\x91\x8d begins when writing to MySQL.
It's MySQL 5.1 with a utf8 table (encoding: utf8 in database.yml) and Rails/AR 3.2.6 (mysql2 0.3.11 gem) if you want to figure it out.
|
I just looked in the database and there are no characters in the table after "A big ".
I can see the full text of the comment in the production.log, and it's obviously making its way to the e-mail notification, but getting truncated at the point where It's MySQL 5.1 with a utf8 table ( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jcs
Nov 5, 2012
Contributor
I can also reproduce this on my Mac with a MySQL 5.5 server, same DB structure.
|
I can also reproduce this on my Mac with a MySQL 5.5 server, same DB structure. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jcs
Nov 8, 2012
Contributor
Committed hack in 9ece666 to temporarily work around this problem by stripping out emoji.
|
Committed hack in 9ece666 to temporarily work around this problem by stripping out emoji. |
jcs
closed this
Nov 8, 2012
jcs
reopened this
May 26, 2013
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jcs
May 26, 2013
Contributor
upgraded server to mariadb, changed tables to utf8mb4, using git version of mysql2 gem, emoji works now
|
upgraded server to mariadb, changed tables to utf8mb4, using git version of mysql2 gem, emoji works now |
jcs
closed this
May 26, 2013
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
steveklabnik
commented
May 26, 2013
|
I can confirm that this totally works. |

steveklabnik commentedNov 5, 2012
See here: https://lobste.rs/s/mycvzo/learning_to_program_and_when_to_start_building_your_own_app/comments/mppo6p