Ticket #5883 (new defect)

Opened 2 years ago

Last modified 1 day ago

UTF-8 wiki pages don't work

Reported by: anonymous Assigned to: diorgenes
Priority: high Component: TracWikiToPdfPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

I have wiki pages in UTF-8. And I can't convert them to PDF. I get ???? instead of letter.

This is what I found, but how could this be applied to TracWikiToPdfPlugin?

http://trac-hacks.org/ticket/489

Attachments

Change History

09/27/09 10:35:42 changed by anonymous

Actually, if I configure Trac like this:

[trac]
default_charset = utf-8

I get letters, but not correct. Not real text.

10/05/09 06:48:08 changed by izzy

Looks like you are right with your assumption. I just remember from another project, for Postscript (closely related to PDF) there was only Latin-1 available as input, no UTF-8 (thought it was not connected with HTMLDoc). So the problem probably is, non-Latin1 content would have to be converted to Latin-1 first - which of course only works as long as used characters are compatible.

06/21/10 15:10:30 changed by Calle Kabo

htmldoc 1.8 doesn't support UTF-8. Download and install htmldoc 1.9 from http://www.htmldoc.org/software.php and it works like a charm :)

01/27/11 15:25:26 changed by anonymous

Htmldoc 1.9 didn't work for me. Still oin 1.8. Here is dirty but solution (works for me). Implement an extra default_charset parameter in wikitopdf section

[trac]
default_charset = utf-8

[wikitopdf]
default_charset = windows-1251

Patch string [source:tracwikitopdfplugin/0.11/wikitopdf/wikitopdf.py ]

codepage = self.env.config.get('trac', 'default_charset', 'iso-8859-1')

to

codepage = self.env.config.get('wikitopdf', 'default_charset', 'iso-8859-1')

or do it with extra "if"

Use Serif bodyfont (for Cyryllic output) and set charset = cp-1251

02/08/12 10:03:43 changed by rjollos

#7081 closed as a duplicate.


Add/Change #5883 (UTF-8 wiki pages don't work)




Change Properties
Action