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:
2. And then I click the link "帮助中心", I got this (messy codes gone):
3. Then I click the “订餐服务” (related with the project mentioned above), every thing is OK:
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.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
In the system information of the JIRA application, ensure that the webwork.i18n.encoding is set to UTF-8. See Special Character Is Not Displayed Correctly In JIRA Issue or Gadget Due To webwork.i18n.encoding settings.
To change the character encoding used in the application server, please ensure you set the Application Server URL encoding, and view your application server's documentation on any other settings required to enable your encoding. You may need to consult Integrating JIRA with Apache or Integrating JIRA applications with IIS, if using those.
To change the character encoding used in the database, see the appropriate child page from Connecting JIRA applications to a database.
Start JIRA with the variable -Dfile.encoding=utf-8 and -Dsun.jnu.encoding=UTF-8
. See Setting properties and options on startup.
Let me know if any of that does not work, then we can proceed further.
Regards,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Any ideas? Thanks for your kind help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:-
Stop JIRA Instance
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.
Take note, the above configuration was without quote (""). There are cases included quote causing JIRA instance unable to startup.
Start JIRA Instance and perform checking
Thank you!
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Start JIRA with the variable -Dfile.encoding=utf-8 and -Dsun.jnu.encoding=UTF-8
. See Setting properties and options on startup.
Take care,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.