src/reportlab/platypus/paraparser.py
changeset 4116 cf49463fc067
parent 4097 1c2ebf285cb7
child 4129 1266500a2c22
equal deleted inserted replaced
4115:f1913fcae595 4116:cf49463fc067
   750             if 'code' in attr:
   750             if 'code' in attr:
   751                 self._syntax_error('<unichar/> invalid with both name and code attributes')
   751                 self._syntax_error('<unichar/> invalid with both name and code attributes')
   752             try:
   752             try:
   753                 v = unicodedata.lookup(attr['name'])
   753                 v = unicodedata.lookup(attr['name'])
   754             except KeyError:
   754             except KeyError:
   755                 self._syntax_error('<unichar/> invalid name attribute\n"%s"' % ascii(name))
   755                 self._syntax_error('<unichar/> invalid name attribute\n"%s"' % ascii(attr['name']))
   756                 v = '\0'
   756                 v = '\0'
   757         elif 'code' in attr:
   757         elif 'code' in attr:
   758             try:
   758             try:
   759                 v = int(eval(attr['code']))
   759                 v = int(eval(attr['code']))
   760                 v = chr(v) if isPy3 else unichr(v)
   760                 v = chr(v) if isPy3 else unichr(v)