Wrong codepage using JIRA

satariall September 13, 2012

I install *.bin latest version of Atlassian Jira to my server.

Console codepage is UTF-8, Latest LTS Ubuntu with updates.

When i create Issue and write russian characters at any form and press "Create" i will receive error.

In this error i see mysql error, where my characters write in bad view, like: /x09 etc.. Something wrong.

Please write me what i wiil do to fix them.

Error creating issue: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Issue][summary,привет][status,1][votes,0][assignee,milar][security,null][resolutiondate,null][type,4][timespent,null][id,10003][reporter,milar][project,10000][environment,null][created,2012-09-14 15:25:32.72][updated,2012-09-14 15:25:32.72][workflowId,10003][description,null][priority,3][timeestimate,null][duedate,null][timeoriginalestimate,null][watches,0][key,SITE-4] (SQL Exception while executing the following:INSERT INTO jiraissue (ID, pkey, PROJECT, REPORTER, ASSIGNEE, issuetype, SUMMARY, DESCRIPTION, ENVIRONMENT, PRIORITY, RESOLUTION, issuestatus, CREATED, UPDATED, DUEDATE, RESOLUTIONDATE, VOTES, WATCHES, TIMEORIGINALESTIMATE, TIMEESTIMATE, TIMESPENT, WORKFLOW_ID, SECURITY, FIXFOR, COMPONENT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Incorrect string value: '\xD0\xBF\xD1\x80\xD0\xB8...' for column 'SUMMARY' at row 1))

1 answer

1 accepted

1 vote
Answer accepted
LucasA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2012

Hello,

I believe that this problem is not related to the system codepage, but to the database codification and collation. If you are using MySQL, you can check the database codification with the following command:

mysql> use <jira_database_name>;
mysql> show variables where variable_name = 'character_set_database';

If your database is running with a non-UTF-8 codification, the best procedure IMO is create a new UTF-8 database and points JIRA for it. If you already has data on your current JIRA system, you will need to create a XML backup from it and re-import after that. So, for creating a MySQL database, you could use the following example:

mysql> create database jira514 character set utf8;

Best regards,
Lucas Timm

satariall September 16, 2012

Yes. The problem is solved. But why jira by default do not create db character set in utf8 by default?..

LucasA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2012

Short/long answer: JIRA doesn't create a database with the needed codification just because it desn't create a database at all.

You'll need to create a database (or a Oracle tablespace) in beforehand for JIRA, and then it will create its tables over it. As per the Atlassian documentation, you must run JIRA on a UTF-8 or Unicode database:

https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+MySQL
https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+PostgreSQL
https://confluence.atlassian.com/display/JIRA/Connecting+JIRA+to+SQL+Server+2008

We already provide the detailed instructions for setting correctly the codification, collation and the needed user permissions.

Best regards,
Lucas Timm

Suggest an answer

Log in or Sign up to answer