プロジェクト

全般

プロフィール

Vote #63158

完了

export issue to pdf will messup when use Chinese language

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Translations_12
対象バージョン:
開始日:
2008/05/04
期日:
進捗率:

0%

予定工数:
category_id:
12
version_id:
4
issue_org_id:
1170
author_id:
460
assigned_to_id:
0
comments:
1
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

When using Chinese language, exporting issue to pdf will messup when the issue description is too long to be auto line broken.
The reason is the original chinese.rb assumes that the Chinese letter in utf-8 has 2 bytes, but actually the utf-8 Chinese letter has 3 bytes. So sometimes the auto line breaking function will insert a break in the middle of a Chinese letter, and then iconv which cann't convert the utf-8 text to gb2312 will throw an exception.
The jpg attachment shows the messup effect.

The attached patch also resolve a type convert error which will cause explicit line break being ignored.

And I have also checked the japanese.rb and korean.rb file in the same rfpdf folder. They also have the same problem that they assumes japanese or korean letter letter in utf-8 has 2 bytes which actually has 3. I hope some local user would correct them because I cann't read japanese or korean.


journals

Fix applied in r1497. Thanks.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリTranslations_12 にセット
  • 対象バージョン0.7.2_4 にセット

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

いいね!0
いいね!0