Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Wurstpack/wurstscript/grill.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off
setlocal
setlocal EnableExtensions DisableDelayedExpansion

rem Save current code page
for /f "tokens=2 delims=: " %%A in ('chcp') do set "_OLDCP=%%A"
rem Save current code page (extract number after ':')
for /f "tokens=2 delims=:" %%A in ('chcp') do for /f "tokens=1" %%B in ("%%A") do set "_OLDCP=%%B"

rem Switch to UTF-8 for this session
chcp 65001 >NUL
Expand Down Expand Up @@ -38,3 +38,4 @@ rem Restore previous code page if we captured it
if defined _OLDCP chcp %_OLDCP% >NUL

endlocal
exit /b %ERRORLEVEL%
7 changes: 4 additions & 3 deletions Wurstpack/wurstscript/wurstscript.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off
setlocal
setlocal EnableExtensions DisableDelayedExpansion

rem Save current code page
for /f "tokens=2 delims=: " %%A in ('chcp') do set "_OLDCP=%%A"
rem Save current code page (extract number after ':')
for /f "tokens=2 delims=:" %%A in ('chcp') do for /f "tokens=1" %%B in ("%%A") do set "_OLDCP=%%B"

rem Switch to UTF-8
chcp 65001 >NUL
Expand Down Expand Up @@ -34,3 +34,4 @@ if not exist "%JAVA%" (
:restore
if defined _OLDCP chcp %_OLDCP% >NUL
endlocal
exit /b %ERRORLEVEL%
Loading