diff --git a/devTools/concatFiles.bat b/devTools/concatFiles.bat
index b2efe3feb26cc06fce81c70c671eab06cc054530..dfbe2df9988cd8fb95aabda86c3069c4f0e6e264 100644
--- a/devTools/concatFiles.bat
+++ b/devTools/concatFiles.bat
@@ -1,6 +1,10 @@
 @echo off
 :: Concatenates files from dir %1 specified with wildcard %2 and outputs result to %3
 
+:: temporary codepage change to avoid mojibake
+FOR /f "tokens=2 delims=:." %%x IN ('CHCP') DO SET _cp=%%x
+CHCP 65001 > NUL
+
 :: TODO Proper temp file instead of bin\list.txt
 IF EXIST %3 DEL %3
 SET _LISTFILE="bin\list.txt"
@@ -12,7 +16,7 @@ sort /O %_LISTFILE% %_LISTFILE%
 :: If we have powershell available, strip the absolute path information
 :: If not, fail silently (which is fine, but will leak path information into the built file)
 powershell -command "" 2> NUL
-IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -raw) -replace [regex]::escape('%CD%'),'' -replace '\"','' ^| set-content -path %_LISTFILE%"
+IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -raw -encoding utf8) -replace [regex]::escape('%CD%'),'' -replace '\"','' ^| set-content -encoding utf8 -path %_LISTFILE%"
 
 :: Append the files
 (FOR /F "usebackq delims=" %%F IN (`type "%_LISTFILE%"`) DO (
@@ -22,3 +26,4 @@ IF %ERRORLEVEL% EQU 0 powershell -command "(get-content -path %_LISTFILE% -raw)
 )
 
 DEL %_LISTFILE%
+CHCP %_CP% > NUL
\ No newline at end of file