When UnrealBuildTool (UBT) is launched by UAT, for example by RunUAT.bat BuildCookRun build, localized (Japanese) MSVC error messages show up garbled in the console and in UAT's Log.txt. The UBT log (UBA*.txt) contains the correct text.
The cause is an encoding mismatch:
Pass ERunOptions.NoHideWindow to RunUBT (RunUBT function in UBTUtils.cs). UBT then shares UAT's console, so the code pages match.
set VSLANG=1041 <EngineDir>\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project="<ProjectDir>\<Project>.uproject" -unrealexe="<EngineDir>\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" -platform=Win64 -clientconfig=Development -build -cook -nop4 -noturnkeyvariables
VSLANG=1041 makes MSVC print its diagnostics in Japanese.
The UAT console output and Log.txt show the compiler errors correctly, the same as UBA-*.txt:
error C2146: 構文エラー: ';' が、識別子 'a' の前に必要です。
The UAT console output and Log.txt are garbled. In Log.txt, the non-ASCII bytes are replaced with U+FFFD (EF BF BD):
error C2146: �\���G���[: ';' ���A���ʎq 'a' �̑O�ɕK�v�ł��B
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-400385 in the post.
| 0 |
| Component | UE - Core - Cpp Tools |
|---|---|
| Affects Versions | 5.8 |
| Created | Oct 2, 2026 |
|---|---|
| Updated | Oct 3, 2026 |