Characters appear as question marks using MySQL

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

Certain characters (Cyrillic or Japanese, for example) appear as question marks "????" even though encoding has already been set to UTF-8 in Confluence, MySQL and the app server. Running the encoding test returns successfully with the supplied testing string (Iñtërnâtiônàlizætiøn).

Diagnosis

Run the following:

1 SHOW VARIABLES LIKE 'character\_set\_%';

Which should return a result set like:

1 2 3 4 5 6 7 8 9 10 11 12 +--------------------------+--------+ | Variable_name | Value +--------------------------+--------+ | character_set_client | latin1 | character_set_connection | latin1 | character_set_database | utf8 | character_set_filesystem | binary | character_set_results | latin1 | character_set_server | latin1 | character_set_system | utf8 +--------------------------+--------+ 7 rows in set (0.00 sec)

Cause

The default encoding for inbound connections isn't set properly. DEFAULT CHARSET will return as utf8 however character_set_server will be something different. In the above example, the character_set_server was set as latin1.

Solution

Resolution

Set default-character-set=utf8, as detailed in Configuring Database Character Encoding.

Please also review the character set and collation settings at the database, table, and column levels as described in this KB: How to Fix the collation and character set of a MySQL Database

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.