Skip to content

Add support for emoji 🙏 #1627

@connor-baer

Description

@connor-baer

Description

Craft 3 doesn't seem to support emoji in any field that I tried (plain text, rich text, category). 😿

I found this StackExchange answer from @takobell where he states that Craft will automatically HTML encode emoji in a rich text field. This doesn't seem to be the case. His answer also mentions the possibility to set the database charset and collation to utf8mb4 and utf8mb4_unicode_ci. Will this work with Craft 3? Is it advisable to do?

Steps to reproduce

  1. 😎 Enter a cool emoji into a field.
  2. 💾 Save the entry.
  3. ⚠️ Receive an error message like this one:
Internal Server Error

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x95\x93' for column 'title' at row 1 The SQL being executed was: UPDATE `craft_content` SET `elementId`=217, `siteId`=1, `title`='New Website 🍻', `field_featured`=1, `field_passphrase`='', `dateUpdated`='2017-04-12 18:36:57' WHERE `id`='348'

Additional info

  • Craft version: Craft 3.0.0-beta.10
  • PHP version: 7.1.4
  • Database driver & version: MySQL 5.7.17

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions