summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/SConscript')
-rw-r--r--Swift/QtUI/SConscript9
1 files changed, 8 insertions, 1 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index b6f6229..0313f1e 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -287,7 +287,14 @@ if env["PLATFORM"] == "win32" :
outfile = open(target[0].abspath, 'w')
outfile.write('{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\n')
for line in infile:
- outfile.write(line)
+ for char in line.decode("utf-8") :
+ if ord(char) > 127 :
+ # FIXME: This is incorrect, because it only works for latin1.
+ # The correct way is \u<decimal utf16 point>? , but this is more
+ # work
+ outfile.write("\\'%X" % ord(char))
+ else :
+ outfile.write(char)
outfile.write('\\par')
outfile.write('}')
outfile.close()