diff options
author | Matthias Hoelzl <tc@xantira.com> | 2017-10-29 17:55:05 +0100 |
---|---|---|
committer | Matthias Hoelzl <tc@xantira.com> | 2017-10-29 19:27:12 +0100 |
commit | a6d53effa5995cc8af995c5a7d80a4a9abc15b7c (patch) | |
tree | b11bf1cda08237f3b5faaa81d4541105e531c91d /compat.py | |
parent | 277e730d34633fac2427f216b53a16fb1641733e (diff) | |
download | redot-engine-a6d53effa5995cc8af995c5a7d80a4a9abc15b7c.tar.gz |
Fix build with Python 3 on Windows
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -12,6 +12,8 @@ if sys.version_info < (3,): return cStringIO.StringIO() def encode_utf8(x): return x + def decode_utf8(x): + return x def iteritems(d): return d.iteritems() def escape_string(s): @@ -38,6 +40,8 @@ else: import codecs def encode_utf8(x): return codecs.utf_8_encode(x)[0] + def decode_utf8(x): + return codecs.utf_8_decode(x)[0] def iteritems(d): return iter(d.items()) def charcode_to_c_escapes(c): |