Patch #1170
closedexport issue to pdf will messup when use Chinese language
0%
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