Modify

Opened 8 years ago

Closed 8 years ago

#1076 closed defect (fixed)

Input charset used for htmldoc should not be trac default

Reported by: tonin Owned by: tonin
Priority: high Component: PageToPdfPlugin
Severity: normal Keywords: charset
Cc: Trac Release: 0.10

Description

As we know, htmldoc isn't utf-8 compatible. However, quite a lot of Trac site these days are using utf-8 as default_charset. This parameter is needed so that utf-8 encoded comments in subversion are rendered correctly under the source browser.

So using this same default_charset as encoding for input feeded to htmldoc is problematic. We'd better use the output charset for this purpose.

See attached patch as proposed solution. I also added a html meta tag containing this charset so that eventually newer version of htmldoc will correctly use it.

Attachments (1)

pagetopdf.py.diff (1.7 KB) - added by tonin 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by tonin

comment:1 Changed 8 years ago by anonymous

  • Cc antoine@… added; anonymous removed

comment:2 Changed 8 years ago by durchanek@…

  • Priority changed from normal to high

I can confirm that this patch is working correctly and I think it should be added to the main tree.

comment:3 Changed 8 years ago by tonin

  • Cc anonymous added; antoine@… removed

Alec, if you gave me SVN write access on this directory, I'd be gald to help and commit my changes.

comment:4 Changed 8 years ago by athomas

  • Owner changed from athomas to tonin

Good idea, fire away.

comment:5 Changed 8 years ago by tonin

  • Status changed from new to assigned

comment:6 Changed 8 years ago by tonin

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [2050]) Fix #1076 better default_charset.

comment:7 Changed 8 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's still a problem in case the page from which we generate the PDF contains characters that cannot be represented in the desired output charset. For info, the supported HTMLDOC charsets currently are http://www.htmldoc.org/htmldoc.html#9_2_12

comment:8 Changed 8 years ago by tonin

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [2100]) Replacing characters without equivalent in the desired output charset (fix #1076).

Add Comment

Modify Ticket

Action
as closed The owner will remain tonin.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.