blog.itcode.devblog.itcode.dev

Fixing Garbled Korean Text in the Tomcat Console

A phenomenon you run into fairly often when running Tomcat — not quite an error, more of a symptom. It happens because Windows Console's default encoding and the encoding Tomcat outputs in don't match.

Fixing Garbled Korean Text in the Tomcat Console

A phenomenon you run into fairly often when running Tomcat — not quite an error, more of a symptom. It happens because Windows Console's default encoding and the encoding Tomcat outputs in don't match.
RWB0104
@RWBwritten at 2021-05-22 03:52:51

🖼️ Encoding Broken

A phenomenon you run into fairly often when running Tomcat — not quite an error, more of a symptom.
It happens because Windows Console's default encoding and the encoding Tomcat outputs in don't match.

Even without being a highly skilled developer, if you're at all familiar with computers, you generally understand that garbled text comes down to mismatched encodings. This particular case happens for the following reason:

  • Windows Console: the default encoding of the Windows OS's configured language (for Korean, that's EUC-KR)
  • Tomcat Console: the encoding from the configuration file (UTF-8 by default)

As you can see, the default encodings differ between the two.

There are two main ways to fix this. Personally, I recommend the second method.

The first option is to change the encoding of the Windows Console. On Windows 10, the OS's default consoles are cmd and PowerShell. All you need to do is change the default encoding of the console you use from EUC-KR to UTF-8.

Unfortunately, neither console provides an option to change the encoding directly. That doesn't mean there's no way to do it, though — you can fix it by modifying the registry.


  1. Type regedit into the taskbar to open the Registry Editor.
  2. Navigate to the path HKEY_CURRENT_USER\Console. This shows the consoles installed under the user account (cmd, PowerShell, Git, etc.).

🖼️ Registry

  1. Click on the folder for the console whose encoding you want to change.

POWERSHELL

# cmd
%SystemRoot%_system32_cmd.exe

# 32-bit PowerShell
%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe

# 64-bit PowerShell
%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe
  1. Double-click the CodePage key to edit it. If CodePage doesn't exist, right-click and create a new DWORD (32-bit) key with that exact name.
  2. Change the value data to the decimal value 65001.

🖼️ Registry

  1. From now on, any Windows Console you launch will use this encoding.

With this, the default encodings of Windows Console and Tomcat both match at UTF-8, so Korean text will now display correctly.
However, since this method changes the encoding of the Windows Console itself, there's a risk that Korean text in other, unrelated programs or tasks run through that console later on could end up garbled instead.
(Most programs are designed to follow the OS's default language encoding.)

Since Windows Console is used broadly for many purposes, this can affect other tasks. That's also why I don't particularly recommend this method.

The second option is to change the encoding of the Tomcat Console. This method is better than the first because it only affects the limited-purpose Tomcat console. Since the problem stems from the Tomcat Console's encoding mismatch in the first place, it makes more sense to change that side.

Most guides will tell you to modify the registry the same way as above, but with Tomcat, there's no need to go that route.

  1. Open %TOMCAT_HOME%\conf\logging.properties.
  2. Change the value of java.util.logging.ConsoleHandler.encoding to EUC-KR. If it hasn't been configured otherwise, UTF-8 is set as the default.
  3. From now on, any Tomcat instance you run will use this encoding.

Once you launch Tomcat, the Korean text will display correctly.

# WAS# Tomcat# Console
ship
blog.itcode.dev

Notes from the π-th Alpaca

7.0.1
Developed by RWB since 2021.057th upgraded at 2026.08