ReportLab, PDF and Latin-1 characters

Svenne Krap usenet2002 at krap.dk
Wed Mar 12 22:22:06 CET 2003


Btw. running IDLE on winblows

On Wed, 12 Mar 2003 21:47:24 +0100, Svenne Krap <usenet2002 at krap.dk>
wrote:

>Hi - yes, it's me again :)
>
>Being a native danish speaker, we are blessed with three extra letters
>:)
>Working with pdfgen, i get
>
><code>
>from reportlab.pdfgen import canvas
>c = canvas.Canvas("C:\\mypdf.pdf")
>c.setFont('Arial',12)
>c.setFont('Helvetica',12)
>c.drawString(10,10,'æøå')
></code>
>
>but then, I get : 
>
><error>
>UnicodeError: ASCII encoding error: ordinal not in range(128)
></error>
>
>How do I manage to get Latin-1 (or even better full unicode) support
>in pdfgen ? 
>
>Svenne





More information about the Python-list mailing list