Unicode characters from a Windows console are not displayed correctly in Bamboo build logs
Platform Notice: Data Center Only - This article only applies to Atlassian products 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
Problem
Unicode characters (such as Korean characters) from a Windows console (e.g. cmd.exe or Powershell script output from a Script Task) don't display correctly. They display as question marks or other unknown characters instead even after setting the Bamboo (or remote agent) JVM to UTF-8 encoding:
Diagnosis
Environment
Windows
Workaround
Ensure that the Bamboo (or remote agent that the build is running on) JVM has been correctly set to UTF-8 by following the instructions in the below knowledge-base article:
Set either the codepage for
cmd.exe
or theOutputEncoding
for Powershell to Unicode before running further commands. E.g.cmd.exe
1 2
chcp 65001 dir
Powershell
1 2
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 dir
Was this helpful?