Modify

Opened 15 years ago

Closed 7 years ago

Last modified 7 years ago

#5883 closed defect (fixed)

UTF-8 wiki pages don't work

Reported by: anonymous Owned by: Ryan J Ollos
Priority: high Component: TracWikiToPdfPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

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

I found #489, but how could this be applied to TracWikiToPdfPlugin?

Attachments (0)

Change History (7)

comment:1 Changed 15 years ago by anonymous

Actually, if I configure Trac like this:

[trac]
default_charset = utf-8

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

comment:2 Changed 15 years ago 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.

comment:3 Changed 14 years ago 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 :)

comment:4 Changed 13 years ago 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 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

comment:5 Changed 12 years ago by Ryan J Ollos

#7081 closed as a duplicate.

comment:6 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16786:

TracWikiToPdfPlugin 3.0.0dev: Add charset option for wikitopdf

Fixes #5883.

comment:7 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Diorgenes Felipe Grzesiuk to Ryan J Ollos

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.