Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira character encoding Edited

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 Atlassian Team Jan 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
Community showcase
Published in Jira Service Management

Announcing Jira Service Management!

Hello there Cloud Community members! Today, we’re thrilled to announce Jira Service Management, the next generation of Jira Service Desk. Jira Service Management touts advancements in IT service ...

2,198 views 28 39
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you