プロジェクト

全般

プロフィール

Vote #69410

完了

Internal server error on formatting an issue as a PDF in Japanese

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
PDF export_39
対象バージョン:
開始日:
2011/03/06
期日:
進捗率:

0%

予定工数:
category_id:
39
version_id:
34
issue_org_id:
7794
author_id:
1249
assigned_to_id:
11192
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
31
ステータス-->[Closed]

説明

IssuesController#show fails with internal server error when

  • params[:format] is pdf
  • AcceptLanguage: ja
  • @issue.description contains an ASCII control character.

This is because the map SJIS_widths does not have a mapping for control characters and it leads concatenation of a String and nil at vendor/plugins/rfpdf/lib/rfpdf/japanese.rb:182.

The attached patch fixes this problem.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I confirmed Japanese locale has problem.
Korean, Simplified and Traditional Chinese don't have problem.
--------------------------------------------------------------------------------
Fixed by r5183 in trunk and r5184 in 1.1-stable.
Thanks.
--------------------------------------------------------------------------------
When I tested #61 in trunk, now. I found ja-pdf.patch problem.

I retested in Redmine 1.1.2 + ja-pdf.patch.

Test string is "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 0"

* Redmine 1.1.2 : test-1-org.pdf
* Redmine 1.1.2 + ja-pdf.patch : test-1-ja-pdf.patch.pdf

The width of the ASCII character has changed by ja-pdf.patch.

I rewrite ja-pdf_fix.patch for Redmine 1.1.2.

* Redmine 1.1.2 + ja-pdf_fix.patch : test-1-ja-pdf_fix.patch.pdf
--------------------------------------------------------------------------------
I have committed r5271 in 1.1-stable.
Thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Sorry, I could not understand note 5.
I committed r5281 in trunk and r5282 in stable-1.1.
Thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,61,Broken character encoding in pdf export
relates,Closed,6505,PDF export broken with Japanese (Gannt and Issue Tracking)

Admin Redmine さんが約4年前に更新

  • カテゴリPDF export_39 にセット
  • 対象バージョン1.1.3_34 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0