summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/Tools/textfile.py')
-rw-r--r--BuildTools/SCons/Tools/textfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BuildTools/SCons/Tools/textfile.py b/BuildTools/SCons/Tools/textfile.py
index 89f8963..cc58666 100644
--- a/BuildTools/SCons/Tools/textfile.py
+++ b/BuildTools/SCons/Tools/textfile.py
@@ -63,7 +63,7 @@ def _do_subst(node, subs):
then all instances of %VERSION% in the file will be replaced with
1.2345 and so forth.
"""
- contents = node.get_text_contents()
+ contents = node.get_contents().decode('utf-8')
if not subs: return contents
for (k,v) in subs:
contents = re.sub(k, v, contents)
@@ -113,7 +113,7 @@ def _action(target, source, env):
lsep = None
for s in source:
if lsep: fd.write(lsep)
- fd.write(_do_subst(s, subs))
+ fd.write(_do_subst(s, subs).encode("utf-8"))
lsep = linesep
fd.close()