Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-8490

Support the utf8mb4 character set in MySQL

    XMLWordPrintable

Details

    • 7
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Summary

      Bitbucket Server currently only supports the utf8 character set on MySQL and MariaDB databases, which only allows Unicode characters in the range U+000000 to U+00FFFF to be represented. Certain characters outside this range (such as emojis like 🙌 - column Symbola) fail with database errors in various contexts, such as being added to Pull Request comments.

      Database migration from a non-MySQL database containing Unicode characters above U+00FFFF into MySQL also fails with errors.

      The utfmb4 character set available in some versions of MySQL can represent Unicode characters above U+00FFFF, but this character set is not currently supported by Bitbucket Server.

      Workarounds

      1. Remove the affected value by query to the instances current database. Since the error is show the affected character which is \xF0\x9F\x99\x8C in migration fail, web searched the \xF0\x9F\x99\x8C and paste the image in the SQL query which appears as {{ 🙌}}.
      Stop the instance and perform the following query.

      SQL Query to get the id value
      SELECT id FROM sta_comment WHERE comment_text LIKE '	🙌';
      
      SQL Query to delete primary key value
      DELETE FROM sta_comment WHERE id = <id_value>;
      

      Restart the instance and migrate to the new database.

      2. Migrate to another database type (e.g., PostgreSQL) instead of MySQL.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bannamalai Baskar Annamalai (Inactive)
              Votes:
              19 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: