Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39058

Inserting emojis that uses 4-byte utf-8 does not work with MySQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.7
    • Fix Version/s: 11.2
    • Component/s: Kernel
    • Environment:
      MySQL
    • 11 status:
      Resolved
    • 10 status:
      Please Merge
    • Property addition/change required:
      Yes
    • Previous Issue Keys:
      SAK-28970, KNL-1431
    • Test Plan:
      Hide
      • Create a new message in Messages or a lesson page in Lessons.
      • In CKEditor, click "Source" to edit HTML.
      • Add decimal codes of UTF8-MB4 characters. Examples: 𐍃 😁
      • Send the message / save the lesson page. A stacktrace is thrown.
      Show
      Create a new message in Messages or a lesson page in Lessons. In CKEditor, click "Source" to edit HTML. Add decimal codes of UTF8-MB4 characters. Examples: 𐍃 😁 Send the message / save the lesson page. A stacktrace is thrown.

      Description

      Adding an emoji(common when using mobile devices) that uses 4 bytes in the editor does not work. Behaviour differs from tool to tool. For example in Lessons tool when pasting the "grinning face with smiling eyes" from http://apps.timwhitlock.info/emoji/tables/unicode in to the editor user will be presented with the error:

      Unable to save or update item. Error was: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x81</...' for column 'html' at row 1

      The correct solution to this is to convert from utf8 to utf8mb4(https://mathiasbynens.be/notes/mysql-utf8mb4).

      Please feel free to edit to change to the correct components, I am not sure how to label this issue.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  ea_umea Erik Lindskog
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code