diff options
author | Tobias Markmann <tm@ayena.de> | 2019-01-03 13:16:13 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2019-01-07 19:56:36 (GMT) |
commit | 6874d64ed2684d83cb3e340f58f6c8c5089aa857 (patch) | |
tree | 24fa6af35302b2d7429f464a37fed9c378ee6f99 /BuildTools/SCons | |
parent | 1632f62222bb10516b2f85249083c0fb30c7d1b3 (diff) | |
download | swift-6874d64ed2684d83cb3e340f58f6c8c5089aa857.zip swift-6874d64ed2684d83cb3e340f58f6c8c5089aa857.tar.bz2 |
Update for Debianswift-4.0.3
Fix UTF-8 handling issues in
BuildTools/SCons/Tools/textfile.py .
Test-Information:
Tested that ./scons test=unit Swift works on Debain
Unstable (sid) and macOS 10.14.2. Tested that
build_for_debian.sh runs successfully on latest Debian
Unstable (sid).
Change-Id: I29d8c97ce3b4eb3e4fd680bdc814fb0c911262ff
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/Tools/textfile.py | 4 |
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() |