How to change the wrong encoding in Bamboo that is causing crashes or characters to display incorrectly

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

  1. You are trying to create issue from Bamboo and it crashed
  2. Code changes with special characters such as umlauts are replaced with different characters
  3. Angled brackets in the UI are replaced with different characters
  4. The build logs are getting cluttered with different characters. 

Cause

The system character encoding is wrong with the expected being UTF8. Another possible cause could be the encoding for the database itself.

Resolution

Bamboo version 5.1.0 onwards
  1. Shutdown Bamboo

  2. Edit <Bamboo Installation Dir>/bin/setenv.sh (.bat for Windows or follow this article if you are starting as a service)

  3. Add this line in quotes under JVM_SUPPORT_RECOMMENDED_ARGS=

    -Dfile.encoding=utf-8 -Dsun.jnu.encoding=utf-8
  4. Restart Bamboo and check that your system encoding changes to utf-8 from the System information page.
Bamboo version before 5.1.0 / Bamboo Agents using Wrapper
  1. Shutdown Bamboo / Agent
  2. Edit conf/wrapper.conf
  3. Add this line:

    wrapper.java.additional.#=-Dfile.encoding=utf-8
    wrapper.java.additional.#=-Dsun.jnu.encoding=utf-8
    Please replace the number # with the next available digit in the series of java additionals
  4. Restart Bamboo / Agent and check that your system encoding changes to utf-8 from the general configuration page.

Note

If you are using MySQL, as stated in our documentation, make sure to include Unicode and character encoding.
Last modified on Sep 17, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.