From fd58e721bdcaa08ace8df8c120f813b596cf198b Mon Sep 17 00:00:00 2001 From: Haze <709547807@qq.com> Date: Wed, 4 Mar 2026 21:18:46 +0800 Subject: [PATCH] =?UTF-8?q?Openclaw=20=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=20(#293)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor Agent Co-authored-by: Haze --- resources/cli/win32/openclaw.cmd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/cli/win32/openclaw.cmd b/resources/cli/win32/openclaw.cmd index a331d7aae..eceea9a21 100644 --- a/resources/cli/win32/openclaw.cmd +++ b/resources/cli/win32/openclaw.cmd @@ -10,7 +10,16 @@ if /i "%1"=="update" ( exit /b 0 ) +rem Switch console to UTF-8 so Unicode box-drawing and CJK text render correctly +rem on non-English Windows (e.g. Chinese CP936). Save the previous codepage to restore later. +for /f "tokens=2 delims=:." %%a in ('chcp') do set /a "_CP=%%a" 2>nul +chcp 65001 >nul 2>&1 + set ELECTRON_RUN_AS_NODE=1 set OPENCLAW_EMBEDDED_IN=ClawX "%~dp0..\..\ClawX.exe" "%~dp0..\openclaw\openclaw.mjs" %* -endlocal +set _EXIT=%ERRORLEVEL% + +if defined _CP chcp %_CP% >nul 2>&1 + +endlocal & exit /b %_EXIT%