From ccec0224fa2e3cd5f782bb9b2a83dda8d3b9f0b9 Mon Sep 17 00:00:00 2001 From: Jason <31175216+wsyjh8@users.noreply.github.com> Date: Thu, 16 Jul 2026 03:42:56 -0400 Subject: [PATCH] fix(daemon): gateway fails to launch on Windows when the profile path contains CJK characters (#107751) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(daemon): write Windows gateway launchers in encodings wscript/cmd can decode gateway.vbs and gateway.cmd were written as UTF-8 without BOM, but wscript.exe only reads .vbs as ANSI or UTF-16 LE with BOM and cmd.exe reads .cmd in the console OEM code page, so installs under CJK profile paths failed with "file not found" (#107416). Write .vbs as UTF-16 LE with BOM, write non-ASCII .cmd content in the system code page when it matches the console page (CJK/Thai locales), and BOM-sniff plus code-page-fallback on read so launchers from older installs keep parsing and migrate on refresh. The hidden .vbs launch path originates from #95480, which addressed console visibility only. * refactor(daemon): drop unused WindowsLauncherScriptFormat export The type is only referenced by encodeWindowsLauncherScript's format parameter within the module, so the export tripped check-deadcode-exports. Keep it module-local. * fix(daemon): mark code-page cmd launchers with their encoding for deterministic readback Prepend an ASCII '@rem openclaw-launcher-encoding=