From 0418774f501a3efe7583dbc7ba8dcae19928629d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 10 May 2011 01:03:28 +0000 Subject: [PATCH] PDF: more strict Redmine TCPDF class initialize() (#8312). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5723 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/export/pdf.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 7c2bf6636..98f045679 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -34,12 +34,12 @@ module Redmine attr_accessor :footer_date def initialize(lang) - if RUBY_VERSION < '1.9' - @ic = Iconv.new(l(:general_pdf_encoding), 'UTF-8') - end - pdf_encoding = l(:general_pdf_encoding).upcase - super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding) set_language_if_valid lang + pdf_encoding = l(:general_pdf_encoding).upcase + if RUBY_VERSION < '1.9' + @ic = Iconv.new(pdf_encoding, 'UTF-8') + end + super('P', 'mm', 'A4', (pdf_encoding == 'UTF-8'), pdf_encoding) case pdf_encoding when 'UTF-8' @font_for_content = 'FreeSans'