# RunUAT.batを使用したCook時に、出力の2バイト文字が文字化けする 

**URL:** <https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249>\
**Category:** 日本語 (Japanese)\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [September 20, 2026, 2:51am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249 "2026-09-20T02:51:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 20, 2026, 2:51am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/1 "2026-09-20T02:51:26Z")

</div>

お世話になっております。

RunUAT.bat BuildCookRun を使用したCookの出力で、2バイト文字が文字化けする症状が出ています。

（UnrealEditor-Cmd.exe -run=cookでは上記問題は発生しません。

-utf8outputを追加すれば解決するのですが、その場合Build側のログの2バイト文字が文字化けするため

RunUAT.bat -cook -build 指定時にログの2バイト文字が正常に出力される設定を探しています。

なにか情報は有りますでしょうか。

■再現手順

1. EpicGameLauncherでUE5.8.2を落とす

2. プロジェクトを作成（テスト時はTPS(C++)

3. RunUAT.batでCookを実行

RunUAT.bat BuildCookRun -project=“%UPROJECT%” -platform=Win64 -cook -cookall

※テスト時はエラーを発生させるために、下記のディレクトリをリネームして-cookallを使用

TPPCPP\_582EB\Content\Characters

■情報（画像を添付

１．RunUAT.batのCook実行時、ログの2バイト文字が文字化けします。（添付uat\_default.PNG

RunUAT.bat BuildCookRun -project=“%UPROJECT%” -platform=Win64 -cook

２．RunUAT.batのCook実行時、-utf8outputを追加するとログの2バイト文字が正常に出力されます。（添付uat\_utf8output.PNG

RunUAT.bat BuildCookRun -project=“%UPROJECT%” -platform=Win64 -cook -utf8output

３．RunUAT.batのBuild実行時、-utf8outputを追加するとログの2バイト文字が文字化けします。（添付build\_utf8output.PNG

RunUAT.bat BuildCookRun -project=“%UPROJECT%” -platform=Win64 -build -utf8output

４．UnrealEditor-Cmd.exeのCook実行時は、ログの2バイト文字が正常に出力されます。（添付unrealeditorcmd.PNG

UnrealEditor-Cmd.exe “%UPROJECT%” -run=cook -targetplatform=Windows

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 20, 2026, 2:51am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/2 "2026-09-20T02:51:29Z")

</div>

**再現手順**  
1. EpicGameLauncherでUE5.8.2を落とす

2. プロジェクトを作成（テスト時はTPS(C++)

3. RunUAT.batでCookを実行

RunUAT.bat" BuildCookRun -project=“%UPROJECT%” -platform=Win64 -cook -cookall

※テスト時はエラーを発生させるために、下記のディレクトリをリネームして-cookallを使用

TPPCPP\_582EB\Content\Characters

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Takashi.Suzuki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Takashi.Suzuki](https://forums.unrealengine.com/u/Takashi.Suzuki)\
**Post date:** [September 25, 2026, 6:57am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/3 "2026-09-25T06:57:56Z")

</div>

お待たせしてしまい大変恐縮です。本件の修正CLが​58447805としてシェルフされており、少なくともcookの文字化けが改善することを確認しています。

ビルドの文字化けについては再現できておらず、恐らくVSの日本語環境のセットアップが必要だと推測していますがお時間を頂くことになってしまうので先んじて回答させていただきます。

もしかするとP4でアクセスできない​可能性があるので修正点を直接以下に記載します。

Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs 330行目付近

```auto
			string Args = String.Format(
				"{0} -run={1} {2} -abslog={3} -stdout -CrashForUAT -unattended -NoLogTimes {5}{4}",
				(ProjectFile == null) ? "" : CommandUtils.MakePathSafeToUseWithCommandLine(ProjectFile.FullName),
				Commandlet,
				String.IsNullOrEmpty(Parameters) ? "" : Parameters,
				CommandUtils.MakePathSafeToUseWithCommandLine(LocalLogFile),
				IsBuildMachine ? "-buildmachine" : "",
				(GlobalCommandLine.Verbose || GlobalCommandLine.AllowStdOutLogVerbosity) ? "-AllowStdOutLogVerbosity " : ""
			);
#if 1 // work around
			//Force a UTF 8 environement as the editor only outputs UTF8 now. 
			RunOptions |= ERunOptions.UTF8Output;
#else
			if (GlobalCommandLine.UTF8Output)
			{
				RunOptions |= ERunOptions.UTF8Output;
			}
#endif
			RunResult = Run(EditorExe, Args, Options: RunOptions, Identifier: Commandlet, SpewFilterCallback: SpewFilterCallback);

```

​

​​

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Takashi.Suzuki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Takashi.Suzuki](https://forums.unrealengine.com/u/Takashi.Suzuki)\
**Post date:** [September 30, 2026, 7:20am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/4 "2026-09-30T07:20:30Z")

</div>

ご確認ありがとうございます。

UATを介したビルドについては上記の修正では改善しないようです。原因はUATからUBTを起動すると、新しいコンソールでUBTが起動しデフォルトのOEMCodepage(ShiftJis)で出力します。

UATはそれをutf8で受け取ってしまうためです。

修正方針が二つあり、UATの読み込み側をOEMCodePageに対応させるか、UBTを共通のコンソールで起動させるかになります。

試したところ後者の方が修正が小さかったのでこちらをお試しいただけますでしょうか。

修正内容としてはUBTの起動フラグにNoHideWindowを追加する方法です。

```auto
		public static void RunUBT(CommandEnvironment Env, FileReference UnrealBuildToolDll, string CommandLine)
		{
			if (!FileReference.Exists(UnrealBuildToolDll))
			{
				throw new AutomationException($"Unable to find UnrealBuildTool.dll: {UnrealBuildToolDll}");
			}
 
			FileReference LogLocation = GetUBTLogLocationFromArgs(Env, CommandLine);
			CommandLine += String.Format(" -log=\"{0}\"", LogLocation);
 
			CommandLine = $"\"{UnrealBuildToolDll}\" {CommandLine}";
// IProcessResult Result = Run(Unreal.DotnetPath.FullName, CommandLine, Options: ERunOptions.AllowSpew | ERunOptions.NoStdOutCapture);
			IProcessResult Result = Run(Unreal.DotnetPath.FullName, CommandLine, Options: ERunOptions.AllowSpew | ERunOptions.NoStdOutCapture | ERunOptions.NoHideWindow );
			if (Result.ExitCode != 0)
			{
				throw new AutomationException((ExitCode)Result.ExitCode, "UnrealBuildTool failed. See log for more details. ({0})", CommandUtils.CombinePaths(Env.FinalLogFolder, LogLocation.GetFileName())) { OutputFormat = AutomationExceptionOutputFormat.Minimal };
			}
		}

```

UATをシェルから起動する方法とエディタのメニューからのパッケージ、ProjectLauncherからのパッケージでそれぞれログが正しく出力されることを確認しています。こちらで改善するかご確認いただいてもよろしいでしょうか。

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Takashi.Suzuki](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Takashi.Suzuki](https://forums.unrealengine.com/u/Takashi.Suzuki)\
**Post date:** [October 2, 2026, 5:26pm UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/5 "2026-10-02T17:26:36Z")

</div>

ご確認ありがとうございます。 本件を UE-400385 UBT compiler output is garbled when run via UAT (Japanese system locale) としてバグ登録させていただきました。

数営業日後にIssuesに公開予定です。それでは正式な修正をお待ちください。

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 25, 2026, 7:11am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/6 "2026-09-25T07:11:25Z")

</div>

返答ありがとうございます、確認させていただきます。

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 28, 2026, 8:37am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/7 "2026-09-28T08:37:10Z")

</div>

此方でもCook時の文字化けが改善している事を確認しました。

対応ありがとうございます。

Buildにつきましては急いでいませんので、お手すきでよろしくお願いします。

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 1, 2026, 7:30am UTC](https://forums.unrealengine.com/t/runuat-bat-cook-2/2848249/8 "2026-10-01T07:30:47Z")

</div>

返答ありがとうございます。

此方でも-utf8output付与したBuild時の文字化けが改善している事を確認しました。

対応ありがとうございます。

今回で、此方での不具合はすべて解決しました。

ひとまず、ワークアラウンドで問題を回避しつつ

アップデートでの正式対応を待ちたいと思います。

質問はクローズとさせていただきます。

対応ありがとうございました。

[Attachment Removed]
