Resolve 'sun.jnu.encoding' Change Issue in Jira Data Center

Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

On Windows machines running Java 17, the sun.jnu.encoding can't be updated from Cp1252 to UTF-8.

Environment

Windows Server 2022

Java OpenJDK Temurin-17.0.7

Diagnosis

Configure below two properties in Jira startup options and restart Jira:

-Dfile.encoding=utf8 -Dsun.jnu.encoding=utf8

In Jira Administration > System > System info

  • System Encoding is set as UTF-8

  • sun.jnu.encoding is set as Cp1252, which is unexpected

Cause

This issue is caused by a known OpenJDK Java defect, where this parameter is overridden by the value provided by the platform after JVM initialization; that means, it does not matter what you set on the JVM startup parameters.

The bug JDK-8275145 has been fixed in Java version 18 and backported to Java 17. However, the issue still persists on Java 17.

Solution

Workaround

To be able to use Java 17, please follow the steps:

  1. In Windows, open the Control Panel and click on Region.

  2. Select the Administrative tab

  3. Click on Change System locale...

  4. Check the option: Beta: Use Unicode UTF-8 for worldwide language support.

  5. Restart Windows OS

  6. The sun.jnu.encoding in Jira switches to UTF-8 successfully.

Updated on September 26, 2025

Still need help?

The Atlassian Community is here for you.