Project

General

Profile

Actions

Patch #1170

closed

export issue to pdf will messup when use Chinese language

Added by Chaoqun Zou over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Translations
Target version:
Start date:
2008-05-04
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

chinese_pdf_messup.jpg (82.1 KB) chinese_pdf_messup.jpg messup effect Chaoqun Zou, 2008-05-04 18:08
chinese.rb.patch (1.83 KB) chinese.rb.patch patch Chaoqun Zou, 2008-05-04 18:08
chinese.rb (12.1 KB) chinese.rb patched chinese.rb file Chaoqun Zou, 2008-05-04 18:08
Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Closed
  • Target version set to 0.7.2

Fix applied in r1497. Thanks.

Actions

Also available in: Atom PDF