aboutsummaryrefslogtreecommitdiff
path: root/build.bat
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-01 20:48:00 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-01 20:48:00 +0200
commitf7243eac74c8407740d86d2a6178b1ea0032e51c (patch)
tree9ed3fe08333fc720bf562fb1694d96257c653bab /build.bat
parentc2ab2bf25a0a823b70d03c9255931e5d1263b3fb (diff)
Force `cl.exe` to parse Odin source as utf-8.
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat3
1 files changed, 3 insertions, 0 deletions
diff --git a/build.bat b/build.bat
index 050789bbc..e07fdf4fb 100644
--- a/build.bat
+++ b/build.bat
@@ -48,6 +48,9 @@ if "%2" == "1" (
set odin_version_raw="dev-%curr_year%-%curr_month%"
set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -EHsc- -GR- -GF
+rem Parse source code as utf-8 even on shift-jis and other codepages
+rem See https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
+set compiler_flags= %compiler_flags% /utf-8
set compiler_defines= -DODIN_VERSION_RAW=\"%odin_version_raw%\"
if not exist .git\ goto skip_git_hash