Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Messy codes in the portal while using Jira Service Desk with Chinese

reeselaye
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2019

Hi,

 

I'm new to Jira, and facing a problem related with Jira Service Desk (Server).

 

I created a Jira Service Desk project.

1. But when I go to the customer portal, messy code is shown (it should be Chinese characters), as below:TIM图片20190302100812.png

2. And then I click the link "帮助中心", I got this (messy codes gone):

TIM图片20190302101705.png

3. Then I click the “订餐服务” (related with the project mentioned above), every thing is OK:

TIM图片20190302101940.png

 

Why? Any suggestions is appreciated :).

 

Other infos:

1. My server is hosted on AliCloud (aliyun.com), and I first installed a Jira Software instance on it, a few days later I added a Jira Service Desk using the Jira admin panel.

2. I have check the MySQL server encoding settings, it's utf8/utf8_bin.

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2019

Hi Reese,

Could you run the following MySQL query to check all the tables in your database as well?

use <your database name>;
show variables like "character_set_database";
show variables like "collation_database";
show variables like "storage_engine";
show PROCEDURE STATUS;
show FUNCTION STATUS;
show TRIGGERS from <db name>;
show FULL TABLES IN <db name> WHERE TABLE_TYPE LIKE 'VIEW';
SELECT TABLE_SCHEMA,
       TABLE_NAME,
       CCSA.CHARACTER_SET_NAME AS DEFAULT_CHAR_SET,
       CCSA.COLLATION_NAME,
       COLUMN_NAME,
       COLUMN_TYPE,
       C.CHARACTER_SET_NAME
  FROM information_schema.TABLES AS T
  JOIN information_schema.COLUMNS AS C USING (TABLE_SCHEMA, TABLE_NAME)
  JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS CCSA
       ON (T.TABLE_COLLATION = CCSA.COLLATION_NAME)
 WHERE TABLE_SCHEMA=SCHEMA() AND C.DATA_TYPE IN ('enum', 'varchar', 'char', 'text', 'mediumtext', 'longtext')
 ORDER BY TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME;

Thank you for your help!

Regards,

Shannon

倍存 李 March 6, 2019

Hi Shannon,

 

Thanks for your help, I run the SQL lines you provided, and got the following outputs (in CSV format):

1、show variables like "character_set_database";


Variable_name,Value
character_set_database,utf8

2、show variables like "collation_database";


Variable_name,Value
collation_database,utf8_bin

3、show variables like "storage_engine";


Variable_name,Value
storage_engine,InnoDB

4、show PROCEDURE STATUS;

EMPTY

5、show FUNCTION STATUS;

EMPTY

6、show TRIGGERS from <db name>;

EMPTY

7、show FULL TABLES IN <db name> WHERE TABLE_TYPE LIKE 'VIEW';

EMPTY

8、SELECT TABLE_SCHEMA,       TABLE_NAME,       CCSA.CHARACTER_SET_NAME AS DEFAULT_CHAR_SET,       CCSA.COLLATION_NAME,       COLUMN_NAME,       COLUMN_TYPE,       C.CHARACTER_SET_NAME  FROM information_schema.TABLES AS T  JOIN information_schema.COLUMNS AS C USING (TABLE_SCHEMA, TABLE_NAME)  JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS CCSA       ON (T.TABLE_COLLATION = CCSA.COLLATION_NAME) WHERE TABLE_SCHEMA=SCHEMA() AND C.DATA_TYPE IN ('enum', 'varchar', 'char', 'text', 'mediumtext', 'longtext') ORDER BY TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME;


TABLE_SCHEMA,TABLE_NAME,DEFAULT_CHAR_SET,COLLATION_NAME,COLUMN_NAME,COLUMN_TYPE,CHARACTER_SET_NAME
jira,ao_0201f0_stats_event,utf8,utf8_bin,EVENT_KEY,varchar(255),utf8
jira,ao_0201f0_stats_event_param,utf8,utf8_bin,PARAM_NAME,varchar(127),utf8
jira,ao_0201f0_stats_event_param,utf8,utf8_bin,PARAM_VALUE,varchar(450),utf8
jira,ao_0ac321_recommendation_ao,utf8,utf8_bin,CATEGORY,varchar(255),utf8
jira,ao_0ac321_recommendation_ao,utf8,utf8_bin,ID,varchar(255),utf8
jira,ao_0ac321_recommendation_ao,utf8,utf8_bin,NAME,varchar(255),utf8
jira,ao_0ac321_recommendation_ao,utf8,utf8_bin,PROJECT_IDS,longtext,utf8
jira,ao_0ac321_recommendation_ao,utf8,utf8_bin,TYPE,varchar(255),utf8
jira,ao_21d670_whitelist_rules,utf8,utf8_bin,EXPRESSION,longtext,utf8
jira,ao_21d670_whitelist_rules,utf8,utf8_bin,TYPE,varchar(255),utf8
jira,ao_21f425_message_ao,utf8,utf8_bin,CONTENT,longtext,utf8
jira,ao_21f425_message_ao,utf8,utf8_bin,ID,varchar(255),utf8
jira,ao_21f425_message_mapping_ao,utf8,utf8_bin,MESSAGE_ID,varchar(255),utf8
jira,ao_21f425_message_mapping_ao,utf8,utf8_bin,USER_HASH,varchar(255),utf8
jira,ao_21f425_user_property_ao,utf8,utf8_bin,KEY,varchar(255),utf8
jira,ao_21f425_user_property_ao,utf8,utf8_bin,USER,varchar(255),utf8

And all the lines below has similar contents, especially the DEFAULT_CHAR_SET,CHARACTER_SET_NAME is always utf8 and COLLATION_NAME utf8_bin.

 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2019

Thank you for confirming that.

Can you please also check the following steps on this article:

Atlassian recommends UTF-8 or Unicode encoding, and case-insensitive collation. In most cases, problems are due to a misconfiguration in one of the components.

Ensure the same encoding is used across all components

The UTF-8 character encoding should be used across the database, application server and web application.

Let me know if any of that does not work, then we can proceed further.

Regards,

Shannon

倍存 李 March 6, 2019

Hello,

Thanks for your advices.

I checked the JIRA Application internationalisation and encoding troubleshooting before, and confirmed the checklist on that page.

1. I'v check the System Information and confirm these: webwork.i18n.encoding == utf-8, file.encoding==utf-8, sun.jnu.encoding==utf-8.


2. The database conf (related to encoding) is allright.


3. URIEncoding=UTF-8 is set, through the server.xml of Tomcat.

 

The only thing I doubt is:  When I check the System Information, I found the system encoding is set to GBK.

TIM图片20190307110204.png

 

Any ideas? Thanks for your kind help :)

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2019

Thank you for pointing that out!

My colleague has mentioned it might be related to this issue:

Could you take a look at Danson's response at the top and see if that fix works for you?

Basically, the workaround was:-

  1. Stop JIRA Instance
  2. Configure below:-
    set JVM_SUPPORT_RECOMMENDED_ARGS=-Dfile.encoding=utf-8 -Dsun.jnu.encoding=utf-8
    • If you are starting JIRA from start-jira.bat, configure it in setenv.bat
    • If you are startup JIRA as a windows service, configure it follow windows service method
    • If you are using Linux server, configure it in setenv.sh.
  3. Take note, the above configuration was without quote (""). There are cases included quote causing JIRA instance unable to startup.
  4. Start JIRA Instance and perform checking

Thank you!

Shannon

倍存 李 March 8, 2019

Thank you Shannon, I will try the workaround later today, see you later then :)

倍存 李 March 8, 2019

Hi Shannon,

I tried the solution from https://community.atlassian.com/t5/Jira-Service-Desk-questions/Portal-characters-encoding-after-upgrade-to-4-0-0/qaq-p/1007697, and it works !

Thanks again for continuously helping me the past days.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2019

Great news, thank you for letting me know.

I think the issue here was that Java wasn't starting with the correct encoding. The workaround for this is also related to the one on JIRA Application internationalisation and encoding troubleshooting:

Take care,

Shannon

倍存 李 March 9, 2019

OK, it's really kind of you !

Actually I'm a product manager in a start-up company, tools from Atlassian are helping us a lot. 

Sincerely, 

Reese

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events