Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,265,407
Community Members
 
Community Events
164
Community Groups

Russian symbols are incorrectly gets from properties file through the i18nHelper in my Jira plugin.

Hello, I have a problem with getting the Cyrillic characters.

This is my property file:

#put any key/value pairs here
duedate.job.cron=0 10 20 ? * MON-FRI
text.rus=тест текст

This is the Java code that gets the property:

final I18nHelper i18nHelper2 = ComponentAccessor.getI18nHelperFactory().getInstance(Locale.getDefault());
final String property = i18nHelper2.getText("text.rus");

libraries that I use

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.util.I18nHelper;
import java.util.Locale;  

Here is a screenshot of what jira getting in debug:

screanProp.png

The workaround is to replace the text with Unicode characters:

text.rus=\u041D\u0435\u043A\u043E\u043D\u0441 \u0438\u0441\u0442\u0435\u043D\u0442

 But this does not completely suit me.

 

Property file encoding is utf-8.

jira version 7.4

1 answer

I found this guide about internationalization.: https://developer.atlassian.com/server/framework/atlassian-sdk/internationalising-your-plugin/

It says - "Please Note: If you any of your translations use non-ASCII characters, which will include most languages other than English, then you must convert your text file to a Unicode-encoded ASCII text file using a tool such as native2ascii."

For this reason, all non-English characters are must be replaced by their Unicode. 

After all, java and utf-8 can support the Cyrillic, but in jira it is not possible(( Can someone explain why? At what level does this limit appear? 

Suggest an answer

Log in or Sign up to answer
TAGS

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