[reportlab-users] Filenames on Windows

Wietse Jacobs wietse.j at gmail.com
Fri Jul 31 08:31:32 EDT 2009

2009/7/31 Peter <peter at maubp.freeserve.co.uk>:

> On Fri, Jul 31, 2009 at 12:32 PM, Wietse Jacobs<wietse.j at gmail.com> wrote:


>> Hello,


>> We've run into a problem when saving a pdf file with reportlab if the

>> filename contains non-ascii characters. This is on Windows.


>> The problem is with how Python handles the "open(filename)" function

>> on Windows in combination with the fact that reportlab will always

>> encode a unicode string as utf-8:


> As a work around, have you tried giving ReportLab a handle, instead

> of a filename? That way you can control how it is named and opened.

Thanks for the suggestion, this works without having to change any
reportlab code.

> Peter


More information about the reportlab-users mailing list