From: Alex R. <sh...@gr...> - 2006-09-06 20:06:01
|
Romain, On Wed, 2006-09-06 at 21:52 +0200, Romain GUESDON wrote: > I have problems whtn generating reports and graphics . French accents seems > to bug the system. No problem with internet book html export A better way to create PDF reports is to use Print... format option (need python-gnome2-desktop installed) and the "print" into PDF (or preview, if you want). You can also use OOo output format and then create PDF from OOo. The PDF format is using reportlab and that has problems with anything but latin1 encoding. In addition, the newer versions of reportlab are converted to unicode, while it has not been the case for older versions. Our code in 2.0.11 counts on non-unicode reportlab. I am attaching the patch that is supposed to take care of this. If you can try it and let me know whether it solves your problem I would greatly appreciate it. Thanks, Alex > GRAMPS : 2.0.11-2 > LANG : fr_FR@euro > Python : 2.4.4 candidate > GTK : 2.8.20 > PyGTK : 2.8.6 > OS : Debian testing/unstable > > Traceback (most recent call last): > File "/usr/share/gramps/docgen/PdfDoc.py", line 182, in close > self.doc.build(self.story) [snip] > File "/usr/lib/python2.4/site-packages/reportlab/pdfgen/textobject.py", > line 336, in _formatText > raise UnicodeDecodeError(*(e.args[:4]+('%s\n%s-->%s<--%s' % > (e.args[4],text[i-10:i],text[i:j],text[j:j+10]),))) > UnicodeDecodeError: 'utf8' codec can't decode bytes in position 30-32: > invalid data > sur cinq g-->éné<--rations de -- Alexander Roitman http://www.gramps-project.org |