I'm generating RTF using the django templating engine. I have some RTF that I generated in OpenOffice and I'm just using the template engine to put the text into it then get the resulting rendered string. For PDF generation I'm using pisa which excepts an encoding parameter, I have passed it utf-8.
In both cases, as an example I can pass a unicode string which contains \u201C but when opening the documents that are generated the characters won't display properly. As you said it could be because the documents are being opened as latin1. I'll have to do some more investigating to try to figure that out. On Jul 29, 9:32 am, Jarek Zgoda <[email protected]> wrote: > Wiadomość napisana w dniu 2009-07-28, o godz. 21:36, przez cootetom: > > > Firstly I have characters encoded by MS Word saved into the database > > in there encoded form. Retrieving these back from the database is fine > > but when I try to use them by generating an RTF or a PDF document then > > they display very badly (e.g. “). > > This really depends on your pdf or rtf generation routine/library. > Does it accept unicode objects? If yes, I'd expect it to require > supplying encoding in some way (default setting, configuration). PDF > by default uses latin1 encoding and has only latin1 fonts, so > generating documents that contain characters from outside latin1 range > usually require some additional work to embed these fonts in > documents. And to complete the mess, Windows (and Word) does not use > latin1 (see:http://effbot.org/zone/unicode-gremlins.htm). > > -- > Artificial intelligence stands no chance against natural stupidity > > Jarek Zgoda, R&D, Redefine > [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

