[reportlab-users] Reportlab encoding issues...
Andy Robinson
andy at reportlab.com
Wed May 25 02:58:53 EDT 2005
> Hi all,
>
> I'm having a real hard time with reportlab and text encoding issues.
> I'm trying to get all european characters to work and common
> currencies, ie. yen, euro, etc. and can't seem to get it to work.
>
> My text is encoded in unicode and I am printing it before creating a
> flowable with the text. Python seems to be printing out the text fine
> but the resulting text in the PDF is jibberish. Can anyone shed any
> light here?
First of all, have you read the chapter 3 "Fonts and Encodings"
in our user guide? If anything in there doesn't work,
please let us know what.
The standard fonts supported (Helvetica, Times-Roman etc.)
are in Latin-1 and your text is Unicode, so you need
a conversion. Or, perhaps better, to use a TrueType
font which will be in Unicode already.
We have a Unicode branch in our repository and this may
move to the trunk very shortly. This will 'get it right'
for Unicode strings, auto-converting to the underlying font.
But this is also a very backward-incompatible change which
would mess up everyone's existing Latin-1 code, so we
have not rolled it out yet. The next release will have
some scheme for setting your defaults so existing users
are safe if they set a config file up right.
Thanks,
Andy Robinson
More information about the reportlab-users
mailing list