py23 Use bytechr() instead of chr()
diff --git a/Lib/fontTools/cffLib.py b/Lib/fontTools/cffLib.py
index 7a74041..bc4cbbd 100644
--- a/Lib/fontTools/cffLib.py
+++ b/Lib/fontTools/cffLib.py
@@ -614,13 +614,13 @@
return value
def writeCard8(file, value):
- file.write(chr(value))
+ file.write(bytechr(value))
def writeCard16(file, value):
file.write(struct.pack(">H", value))
def packCard8(value):
- return chr(value)
+ return bytechr(value)
def packCard16(value):
return struct.pack(">H", value)
@@ -635,9 +635,9 @@
d = {}
for op, name, arg, default, conv in table:
if isinstance(op, tuple):
- op = chr(op[0]) + chr(op[1])
+ op = bytechr(op[0]) + bytechr(op[1])
else:
- op = chr(op)
+ op = bytechr(op)
d[name] = (op, arg)
return d