summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3rdParty/SCons/02_fix_python_3_windows_unicode.diff13
-rw-r--r--3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py2
2 files changed, 14 insertions, 1 deletions
diff --git a/3rdParty/SCons/02_fix_python_3_windows_unicode.diff b/3rdParty/SCons/02_fix_python_3_windows_unicode.diff
new file mode 100644
index 0000000..f512ba9
--- /dev/null
+++ b/3rdParty/SCons/02_fix_python_3_windows_unicode.diff
@@ -0,0 +1,13 @@
+diff --git a/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
+index 9e2327af3..46176adc1 100644
+--- a/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
++++ b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
+@@ -127,7 +127,7 @@ def _action(target, source, env):
+ # write the file
+ try:
+ if SCons.Util.PY3:
+- target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE, newline='')
++ target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE, newline='', encoding="utf8")
+ else:
+ target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE)
+ except (OSError, IOError):
diff --git a/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
index 9e2327a..46176ad 100644
--- a/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
+++ b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/textfile.py
@@ -127,7 +127,7 @@ def _action(target, source, env):
# write the file
try:
if SCons.Util.PY3:
- target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE, newline='')
+ target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE, newline='', encoding="utf8")
else:
target_file = open(target[0].get_path(), TEXTFILE_FILE_WRITE_MODE)
except (OSError, IOError):