Project

General

Profile

Actions

Defect #13138

closed

Generating PDF of issue causes UndefinedConversionError with htmlentities gem

Added by Mathew C almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
PDF export
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When attempting to create a PDF of an issue an internal error occurs. I think it is caused by the '–' character (long dash or hyphen), because when I changed it to a standard dash '-' the PDF generated correctly.

In the log is the following:

Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8):
  lib/plugins/rfpdf/lib/tcpdf.rb:4346:in `unhtmlentities'
  lib/plugins/rfpdf/lib/tcpdf.rb:3542:in `block in writeHTML'
  lib/plugins/rfpdf/lib/tcpdf.rb:3509:in `each'
  lib/plugins/rfpdf/lib/tcpdf.rb:3509:in `writeHTML'
  lib/plugins/rfpdf/lib/tcpdf.rb:3620:in `writeHTMLCell'
  lib/redmine/export/pdf.rb:129:in `RDMwriteHTMLCell'
  lib/redmine/export/pdf.rb:681:in `block in issue_to_pdf'
  lib/redmine/export/pdf.rb:668:in `each'
  lib/redmine/export/pdf.rb:668:in `issue_to_pdf'
  app/controllers/issues_controller.rb:124:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:116:in `show'

This is the output of RAILS_ENV=production rake about

About your application's environment
Ruby version              1.9.3 (x86_64-linux)
RubyGems version          1.8.11
Rack version              1.4
Rails version             3.2.11
Active Record version     3.2.11
Action Pack version       3.2.11
Active Resource version   3.2.11
Action Mailer version     3.2.11
Active Support version    3.2.11
Middleware                Rack::Cache, ActionDispatch::Static, Rack::Lock, #
<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x000000025c99a8>, Rack::Runtime,
 Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger,
 ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp,
 ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement,
 ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore,
 ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head,
 Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport,
 OpenIdAuthentication
Application root          /var/www/redmine-2.2.2
Environment               production
Database adapter          mysql2
Database schema version   20121026003537


Files

ecookbook-1.pdf (309 KB) ecookbook-1.pdf Toshi MARUYAMA, 2013-02-12 12:37
htmlentities_delete_r11398.diff (1.63 KB) htmlentities_delete_r11398.diff Jun NAITOH, 2013-02-15 13:25

Related issues

Has duplicate Redmine - Defect #12309: rfpdf fails to include htmlentities gem, even when installed, thus potentially corrupting pdf outputClosed

Actions
Actions

Also available in: Atom PDF