From: Sidnei da S. <si...@x3...> - 2003-05-02 17:01:04
|
On Fri, May 02, 2003 at 12:17:19PM -0400, Aahz wrote: | On Fri, May 02, 2003, Sidnei da Silva wrote: | > | > Im working on a PDF Writer for docutils | > (http://cvs.sf.net/cgi-bin/viewcvs.cgi/docutils/sandbox/dreamcatcher/) | > and just found a small problem. The FileOutput from docutils.io tries to | > encode the output as unicode, which doesnt work for me. If I write the | > raw PDF using Reportlabs, it works, but if I pass it to FileOutput, it | > converts the output to unicode, which generates a broken pdf file. | > | > What do you guys suggest? Writing a RawOutput or passing a switch to | > FileOutput so it doesnt try to encode the output? | | Have you tried setting encoding to 'ascii'? I tried 'ascii', 'latin1', 'utf8' and none worked. The only one that seems to work is 'unicode', which short-circuits the encode function of docutils.io.Output to return the raw text without encoding. -- Sidnei da Silva (dreamcatcher) <si...@x3...> X3ng Web Technology <http://www.x3ng.com.br> GNU/Linux user 257852 Debian GNU/Linux 3.0 (Sid) 2.4.18 ppc COBOL is for morons. -- E.W. Dijkstra |