Jira character encoding

Gleb Kartashov
Contributor
January 19, 2020

Hi! I have a problem with Jira character encoding. I have a Groovy code which is used to execute POST request to my server app (Express.js) and recieved data has question mark symbols instead of cyrrillic characters.

image.png

This is what characters look like from Jira:

image.png

Groovy code:

import groovyx.net.http.HTTPBuilder;
import static groovyx.net.http.ContentType.*;
import groovyx.net.http.ContentType;
import static groovyx.net.http.Method.*;

def http = new HTTPBuilder('myhost.com')
http.request( POST ) {
uri.path = '/'
requestContentType = ContentType.JSON
body = [title: issue.get("summary"), desc: issue.get("description")]
log.info(body.title)
response.success = { resp ->
log.info( "POST response status: "+resp.statusLine+"}")
}
}

 Server app code (Express.js)

app.post('/',(req,res) => {
res.send('test');
console.log('post in');
//console.dir(req.charset);
console.dir(req.body);

}

Database character encoding is UTF8 and chartype is Russian_Russia.1251

image.png

Jira character encoding is "Cp1252" and I dont know how to change this. If somebody could explaing how to do this it would be great.

Also I asked this question couple of weeks before and I've been told that problem is on my server app side https://community.atlassian.com/t5/Jira-Service-Desk-questions/Character-encoding-with-HTTPBuilder/qaq-p/1250738

But on the same Jira server I'm using Insight Automation tool to post data to Confluence server and those characters also are corrupted

image.png

Jira and Confluence databases use same config (as described above)

1 answer

1 accepted

0 votes
Answer accepted
Adrian Stephen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2020

Hi @Gleb Kartashov 


To resolve this issue, please follow the steps from:

https://confluence.atlassian.com/jirakb/jira-application-internationalisation-and-encoding-troubleshooting-203394762.html

  1. Stop JIRA
  2. Follow the steps from this page: https://confluence.atlassian.com/adminjiraserver070/setting-properties-and-options-on-startup-749383528.html
  3. From /bin, open setenv.sh. Find the section JVM_SUPPORT_RECOMMENDED_ARGS=
  4. Add the following arguments in that section JVM_SUPPORT_RECOMMENDED_ARGS="-Dfile.encoding=utf-8 -Dsun.jnu.encoding=UTF-8" 
  5. Save that file=
  6. Restart the application and verify if the issue is fixed

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events