Characters appear as question marks using MySQL
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
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).
診断
以下を実行します。
SHOW VARIABLES LIKE 'character\_set\_%';
Which should return a result set like:
+--------------------------+--------+
| 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)
原因
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
.
ソリューション
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