src/reportlab/lib/rl_accel.py
changeset 4071 8a945e72d376
parent 4026 6c8ac18e0c9c
child 4089 ca6c60fd1f62
--- a/src/reportlab/lib/rl_accel.py	Wed Apr 02 15:16:05 2014 +0100
+++ b/src/reportlab/lib/rl_accel.py	Wed Apr 02 17:53:26 2014 +0100
@@ -29,7 +29,7 @@
         _py_funcs[fn] = None
 
 if _py_funcs:
-    from reportlab.lib.utils import isBytes, isUnicode, isSeq, isPy3, rawBytes, asNative
+    from reportlab.lib.utils import isBytes, isUnicode, isSeq, isPy3, rawBytes, asNative, asUnicode, asBytes
     from math import log
     from struct import unpack
 
@@ -312,7 +312,7 @@
             out(lastword)
 
         r = ''.join(out.__self__)
-        return r.encode('latin1') if isUnicode(input) else r
+        return asBytes(r,enc='latin1')
     _py_funcs['asciiBase85Decode'] = asciiBase85Decode
 
 if 'sameFrag' in _py_funcs: