[reportlab-users] Unicode character Eclipse IDE vs. MS VisualStudio 2012
Robin Becker
robin at reportlab.com
Thu Jan 17 10:48:28 EST 2013
On 17/01/2013 09:37, Tom Py wrote:
..........).
>
>
> min. example begin
>
> # -*- coding: latin-1 -*-
>
> from reportlab.pdfgen import canvas
> from reportlab.platypus import Table
>
> str = [['ü']]
> myCanvas = canvas.Canvas("test.pdf")
> tableData = Table(str)
> tableData.wrapOn(myCanvas, 0, 0)
> tableData.drawOn(myCanvas, 0, 0)
>
> myCanvas.getpdfdata()
>
> print 'done'
>
> min. example end
>
>
> I'm using IronPython 2.7.2 and ReportLab 2.5
>
> Does anyone have an idea?
>
>
> Thx, Tom
......
CPython reportlab supports unicode or utf8 encodings so you could try
str = [[u'ü']]
or
str = [[u'ü'.encode('utf8')]]
you seem to be using latin-1 so that's where the error comes from
--
Robin Becker
More information about the reportlab-users
mailing list