Defect #13781
closedCJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK locales
0%
Description
When exporting tickets list view to PDF in English personal preference, most of Japanese characters are not shown.
Attached is an example.
Because when in Japanese personal preference those letters are shown, so far no preblem. But this might be annoying for bilingual (or multilingual) people who prefer English controls of Redmine, but need reading his/her responsible issues written in Japanese.
Files
Related issues
Updated by Toshi MARUYAMA over 11 years ago
Because embedded FreeSans font does not have glyph.
See #61#note-92.
Updated by Toshi MARUYAMA over 11 years ago
- Subject changed from Japanese characters are not shown in PDF exported ticket list when in English preference to CJK(Chinese/Japanese/Korean) characters are not shown in PDF exported ticket list when in English preference
Updated by Toshi MARUYAMA over 11 years ago
- Subject changed from CJK(Chinese/Japanese/Korean) characters are not shown in PDF exported ticket list when in English preference to CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK locales
Updated by Filou Centrinov over 11 years ago
In this and in the related issues the problem is that the included font file does not contain the appropriate glyph.
http://sourceforge.net/projects/tcpdf/files/ provides newer fonts files. The problem is the pdf size increases enormously (#13575).
Updated by Toshi MARUYAMA over 11 years ago
- Has duplicate Defect #14701: PDF Export Encoding added
Updated by Toshi MARUYAMA about 11 years ago
- Has duplicate Defect #1249: 在生成PDF文件时,中文出现乱码 added
Updated by Maxime Vez over 10 years ago
+1 same annoying problem here.
Recently Adobe and Google released an open-source CJK font : http://blog.typekit.com/2014/07/15/introducing-source-han-sans/
Maybe it can help in solving this issue.
Updated by Toshi MARUYAMA over 10 years ago
- Related to Feature #17570: use rbpdf gem instead of bundled rfpdf added
Updated by Jun NAITOH over 10 years ago
I think that this problem is unsolvable even if it uses a Han Sans font.
It is because the language of a Chinese character is indistinguishable because of Han unification.
I think that fix of this problem requires a PDF font setting function.
Font Setting Plan (Example)¶
- Add PDF export options dialog. (like issues CSV export options dialog.)
- Add PDF font panel for personal account setting.
- Add PDF font panel for Administration settings.
- Add default PDF font setting in configuration.yml.
Updated by Toshi MARUYAMA over 10 years ago
- Priority changed from Low to Normal
- Target version set to 2.6.0
I think it is better in configuration.yml because of #4787 consistency.
Updated by Daniel Felix over 10 years ago
Well a user defined setting would be better, or?
A default in the configuration won't help on a multilingual environment. Like people have issues in korean and issues posted in german for example. I think this would collide and force the german output to break.
Updated by Jun NAITOH over 10 years ago
Daniel Felix wrote:
A default in the configuration won't help on a multilingual environment.
Like people have issues in korean and issues posted in german for example.
I think this would collide and force the german output to break.
Oh... It is important indication.
I consider whether there is any better solution...
Updated by Toshi MARUYAMA over 10 years ago
- Related to Defect #4787: Gannt to PNG - CJK (Chinese, Japanese and Korean) characters appear as ? added
Updated by Jun NAITOH about 10 years ago
- File general_pdf_fontname_r13446.patch general_pdf_fontname_r13446.patch added
- File pdf_font_name_r13446.patch pdf_font_name_r13446.patch added
Maxime Vez wrote:
Recently Adobe and Google released an open-source CJK font : http://blog.typekit.com/2014/07/15/introducing-source-han-sans/
Maybe it can help in solving this issue.
I tried to use Adobe and Google CJK Font(han-sans), but I couldn't convert from OTF font to TTF font.
rbpdf library can use only a TTF font.
Daniel Felix wrote:
A default in the configuration won't help on a multilingual environment.
Like people have issues in korean and issues posted in german for example.
I think this would collide and force the german output to break.
I wrote patch.
Plan A. (use config/locales/*.yml) : I recommend.¶
- general_pdf_fontname_r13446.patch
locale general_pdf_fontname: Language ja.yml kozminproregular Japanese ko.yml hysmyeongjostdmedium Korean (UHC) th.yml freeserif Thai vi.yml DejaVuSans Vietnamese zh-TW.yml msungstdlight Traditional Chinese (BIG5) zh.yml stsongstdlight Simplified Chinese (GB18030) other yml freesans etc.. Helvetica
This plan was considered in order to support multilingual environment.
If you use English locale (en.yml) and you want to Japanese characters, so please set to "general_pdf_fontname: kozminproregular" on en.yml.
Plan B. (use configuration.yml) : I don't recommend.¶
- pdf_font_name_r13446.patch
Configuration of PDF font for non CJKV (and Thai) locale.
I think that this plan has the big influence in multilingual environment.
Updated by Toshi MARUYAMA about 10 years ago
I think Plan A. is better because #8312 supported to switch using font by changing "general_pdf_encoding" at locale yml.
Updated by Jun NAITOH about 10 years ago
Toshi MARUYAMA wrote:
I think Plan A. is better because #8312 supported to switch using font by changing "general_pdf_encoding" at locale yml.
me, too. :)
Plan A : fontname table updated. (add Font type)¶
locale | general_pdf_fontname: (Font type) | Language |
---|---|---|
ja.yml | kozminproregular (Non embedded Font (CID Font)) | Japanese |
ko.yml | hysmyeongjostdmedium (Non embedded Font (CID Font)) | Korean (UHC) |
th.yml | freeserif (embedded Font) | Thai |
vi.yml | DejaVuSans (embedded Font) | Vietnamese |
zh-TW.yml | msungstdlight (Non embedded Font (CID Font)) | Traditional Chinese (BIG5) |
zh.yml | stsongstdlight (Non embedded Font (CID Font)) | Simplified Chinese (GB18030) |
other yml | freesans (embedded Font) | |
etc.. | courier, helvetica, times, symbol, zapfdingbats (Non embedded Font(Core Font)) |
Updated by Toshi MARUYAMA about 10 years ago
- Status changed from New to Closed
- Resolution set to Fixed
general_pdf_fontname_r13446.patch is committed in trunk r13458 and 2.6-stable r13460, thanks.
Updated by gank gu about 10 years ago
Jun NAITOH wrote:
Maxime Vez wrote:
Recently Adobe and Google released an open-source CJK font : http://blog.typekit.com/2014/07/15/introducing-source-han-sans/
Maybe it can help in solving this issue.
I tried to use Adobe and Google CJK Font(han-sans), but I couldn't convert from OTF font to TTF font.
rbpdf library can use only a TTF font.Daniel Felix wrote:
A default in the configuration won't help on a multilingual environment.
Like people have issues in korean and issues posted in german for example.
I think this would collide and force the german output to break.I wrote patch.
Plan A. (use config/locales/*.yml) : I recommend.¶
- general_pdf_fontname_r13446.patch
locale general_pdf_fontname: Language ja.yml kozminproregular Japanese ko.yml hysmyeongjostdmedium Korean (UHC) th.yml freeserif Thai vi.yml DejaVuSans Vietnamese zh-TW.yml msungstdlight Traditional Chinese (BIG5) zh.yml stsongstdlight Simplified Chinese (GB18030) other yml freesans etc.. Helvetica This plan was considered in order to support multilingual environment.
If you use English locale (en.yml) and you want to Japanese characters, so please set to "general_pdf_fontname: kozminproregular" on en.yml.
Plan B. (use configuration.yml) : I don't recommend.¶
- pdf_font_name_r13446.patch
Configuration of PDF font for non CJKV (and Thai) locale.
I think that this plan has the big influence in multilingual environment.
If I'm using english and I want both Traditional Chinese (BIG5) and Simplified Chinese (GB18030), what can I do ? can I specify two font name in "general_pdf_fontname" ?
Updated by Toshi MARUYAMA about 10 years ago
gank gu wrote:
If I'm using english and I want both Traditional Chinese (BIG5) and Simplified Chinese (GB18030), what can I do ? can I specify two font name in "general_pdf_fontname" ?
You cannot because of Han unification .
Updated by Toshi MARUYAMA almost 10 years ago
- Has duplicate Feature #19282: Export unicode error. added
Updated by Toshi MARUYAMA over 9 years ago
- Related to Defect #20499: Bangla charater of PDF added
Updated by Toshi MARUYAMA over 9 years ago
- Related to deleted (Defect #20499: Bangla charater of PDF)
Updated by nikunj begda over 5 years ago
Hello i found solution for this issue:
1. you need to create mysql database with utf8 parameter.
2. go to /redmine/app/models/user.rb and replace this line and comment the default one
#validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\Å\/
validates_format_of :login, :with => /[a-zA-ZąćęłńóśźżĄĆĘÅŃÓŚŹŻ]{5,15}(?:\+[a-zA-ZąćęłńóśźżĄĆĘÅŃÓŚŹŻ]{5,15}){0,2}/
or add your language characters before end '/ ' and save the file
now you can login with all the characters.