[reportlab-users] Using TTFs with non-ASCII characters

Dinu Gherman reportlab-users@reportlab.com
Wed, 03 Jul 2002 11:14:31 +0200 (CEST)


Gherman <gherman@darwin.in-berlin.de>:

> > Fixed:
> 
> Works great! I've updated my sample file:

BTW, what is the canonical way to make non-ASCII characters 
appear as expected in strings "automatically"? I've tried
using something like this:

  c.drawString(100, y, u"")

which gives me:

  File ".../reportlab/pdfbase/ttfonts.py", line 930, in splitString
    for code in parse_utf8(text):
  File ".../reportlab/pdfbase/ttfonts.py", line 86, in parse_utf8
    raise ValueError, "Invalid UTF-8 string"
ValueError: Invalid UTF-8 string

Is there another way to do it?

Thanks,

Dinu