paraparser.py: fix label encoding py33
authorrobin
Wed, 27 Nov 2013 17:34:49 +0000
branchpy33
changeset 3856 5316e8678dd9
parent 3855 a9e0790813d0
child 3857 e9b94b4da956
paraparser.py: fix label encoding
src/reportlab/platypus/paraparser.py
--- a/src/reportlab/platypus/paraparser.py	Wed Nov 27 17:02:24 2013 +0000
+++ b/src/reportlab/platypus/paraparser.py	Wed Nov 27 17:34:49 2013 +0000
@@ -16,8 +16,7 @@
 import unicodedata
 import reportlab.lib.sequencer
 from reportlab.lib.abag import ABag
-from reportlab.lib.utils import ImageReader, isPy3, annotateException
-
+from reportlab.lib.utils import ImageReader, isPy3, annotateException, encode_label
 from reportlab.lib.colors import toColor, white, black, red, Color
 from reportlab.lib.fonts import tt2ps, ps2tt
 from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY
@@ -972,7 +971,7 @@
                 offset = int(offset)
             except:
                 raise ValueError('index tag offset is %r not an int' % offset)
-        defn.label = base64.encodestring(pickle.dumps((label,format,offset))).strip()
+        defn.label = encode_label((label,format,offset))
         defn.name = name
         defn.kind='index'
         self._push(cbDefn=defn)