https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-04-16T10:48:31ZRedmineRedmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=486632013-04-16T10:48:31ZToshi MARUYAMA
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=486642013-04-16T10:50:27ZToshi MARUYAMA
<ul></ul><p>Because embedded FreeSans font does not have glyph.<br />See <a class="issue tracker-1 status-5 priority-5 priority-high2 closed" title="Defect: Broken character encoding in pdf export (Closed)" href="https://www.redmine.org/issues/61#note-92">#61#note-92</a>.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=486682013-04-16T10:58:46ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>Japanese characters are not shown in PDF exported ticket list when in English preference</i> to <i>CJK(Chinese/Japanese/Korean) characters are not shown in PDF exported ticket list when in English preference</i></li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=486692013-04-16T11:00:29ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>CJK(Chinese/Japanese/Korean) characters are not shown in PDF exported ticket list when in English preference</i> to <i>CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK locales</i></li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=486842013-04-16T13:40:38ZFilou Centrinov
<ul></ul><p>Related with <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Export to Persian PDF problem (Closed)" href="https://www.redmine.org/issues/10681">#10681</a>, <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Graphic characters not exported (Closed)" href="https://www.redmine.org/issues/13575">#13575</a></p>
<p>In this and in the related issues the problem is that the included font file does not contain the appropriate glyph.<br /><a class="external" href="http://sourceforge.net/projects/tcpdf/files/">http://sourceforge.net/projects/tcpdf/files/</a> provides newer fonts files. The problem is the pdf size increases enormously (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Graphic characters not exported (Closed)" href="https://www.redmine.org/issues/13575">#13575</a>).</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=512862013-08-16T02:30:03ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-3 priority-lowest closed" href="/issues/14701">Defect #14701</a>: PDF Export Encoding</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=531882013-11-17T11:15:33ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/1249">Defect #1249</a>: 在生成PDF文件时,中文出现乱码</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=582352014-08-25T02:34:46ZMaxime Vez
<ul></ul><p>+1 same annoying problem here.</p>
<p>Recently Adobe and Google released an open-source CJK font : <a class="external" href="http://blog.typekit.com/2014/07/15/introducing-source-han-sans/">http://blog.typekit.com/2014/07/15/introducing-source-han-sans/</a></p>
<p>Maybe it can help in solving this issue.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583382014-08-28T10:35:28ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/17570">Feature #17570</a>: use rbpdf gem instead of bundled rfpdf</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583442014-08-28T20:25:03ZJun NAITOH
<ul></ul><p>I think that this problem is unsolvable even if it uses a Han Sans font.</p>
<p>It is because the language of a Chinese character is indistinguishable because of <a href="http://en.wikipedia.org/wiki/Han_unification" class="external">Han unification</a>.</p>
<p>I think that fix of this problem requires a PDF font setting function.</p>
<a name="Font-Setting-Plan-Example"></a>
<h3 >Font Setting Plan (Example)<a href="#Font-Setting-Plan-Example" class="wiki-anchor">¶</a></h3>
<ol>
<li>Add PDF export options dialog. (like issues CSV export options dialog.)</li>
<li>Add PDF font panel for personal account setting.</li>
<li>Add PDF font panel for Administration settings.</li>
<li>Add default PDF font setting in configuration.yml.</li>
</ol> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583492014-08-29T10:25:14ZToshi MARUYAMA
<ul><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Target version</strong> set to <i>2.6.0</i></li></ul><p>I think it is better in configuration.yml because of <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Gannt to PNG - CJK (Chinese, Japanese and Korean) characters appear as ? (Closed)" href="https://www.redmine.org/issues/4787">#4787</a> consistency.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583502014-08-29T11:24:45ZDaniel Felix
<ul></ul><p>Well a user defined setting would be better, or?</p>
<p>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.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583542014-08-30T07:13:24ZJun NAITOH
<ul></ul><p>Daniel Felix wrote:</p>
<blockquote>
<p>A default in the configuration won't help on a multilingual environment.<br />Like people have issues in korean and issues posted in german for example.<br />I think this would collide and force the german output to break.</p>
</blockquote>
<p>Oh... It is important indication.</p>
<p>I consider whether there is any better solution...</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=583562014-08-30T08:46:17ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/4787">Defect #4787</a>: Gannt to PNG - CJK (Chinese, Japanese and Korean) characters appear as ?</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=591452014-10-15T15:12:35ZJun NAITOH
<ul><li><strong>File</strong> <a href="/attachments/12477">general_pdf_fontname_r13446.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/12477/general_pdf_fontname_r13446.patch">general_pdf_fontname_r13446.patch</a> added</li><li><strong>File</strong> <a href="/attachments/12478">pdf_font_name_r13446.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/12478/pdf_font_name_r13446.patch">pdf_font_name_r13446.patch</a> added</li></ul><p>Maxime Vez wrote:</p>
<blockquote>
<p>Recently Adobe and Google released an open-source CJK font : <a class="external" href="http://blog.typekit.com/2014/07/15/introducing-source-han-sans/">http://blog.typekit.com/2014/07/15/introducing-source-han-sans/</a></p>
<p>Maybe it can help in solving this issue.</p>
</blockquote>
<p>I tried to use Adobe and Google CJK Font(han-sans), but I couldn't convert from OTF font to TTF font.<br />rbpdf library can use only a TTF font.</p>
<p>Daniel Felix wrote:</p>
<blockquote>
<p>A default in the configuration won't help on a multilingual environment.<br />Like people have issues in korean and issues posted in german for example.<br />I think this would collide and force the german output to break.</p>
</blockquote>
<p>I wrote patch.</p>
<a name="Plan-A-use-configlocalesyml-I-recommend"></a>
<h3 >Plan A. (use config/locales/*.yml) : I recommend.<a href="#Plan-A-use-configlocalesyml-I-recommend" class="wiki-anchor">¶</a></h3>
<ul>
<li>general_pdf_fontname_r13446.patch
<table>
<tr>
<th>locale</th>
<th>general_pdf_fontname: </th>
<th>Language</th>
</tr>
<tr>
<td>ja.yml</td>
<td>kozminproregular</td>
<td>Japanese</td>
</tr>
<tr>
<td>ko.yml</td>
<td>hysmyeongjostdmedium</td>
<td>Korean (UHC)</td>
</tr>
<tr>
<td>th.yml</td>
<td>freeserif</td>
<td>Thai</td>
</tr>
<tr>
<td>vi.yml</td>
<td>DejaVuSans</td>
<td>Vietnamese</td>
</tr>
<tr>
<td>zh-TW.yml</td>
<td>msungstdlight</td>
<td>Traditional Chinese (BIG5)</td>
</tr>
<tr>
<td>zh.yml</td>
<td>stsongstdlight</td>
<td>Simplified Chinese (GB18030)</td>
</tr>
<tr>
<td>other yml</td>
<td>freesans</td>
</tr>
<tr>
<td>etc..</td>
<td>Helvetica</td>
</tr>
</table></li>
</ul>
<p>This plan was considered in order to support multilingual environment.</p>
<p>If you use English locale (en.yml) and you want to Japanese characters, so please set to "general_pdf_fontname: kozminproregular" on en.yml.</p>
<a name="Plan-B-use-configurationyml-I-dont-recommend"></a>
<h3 >Plan B. (use configuration.yml) : I don't recommend.<a href="#Plan-B-use-configurationyml-I-dont-recommend" class="wiki-anchor">¶</a></h3>
<ul>
<li>pdf_font_name_r13446.patch</li>
</ul>
<p>Configuration of PDF font for non CJKV (and Thai) locale.</p>
<p>I think that this plan has the big influence in multilingual environment.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=592202014-10-18T12:45:24ZToshi MARUYAMA
<ul></ul><p>I think Plan A. is better because <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Switch to TCPDF from FPDF for PDF export (Closed)" href="https://www.redmine.org/issues/8312">#8312</a> supported to switch using font by changing "general_pdf_encoding" at locale yml.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=592232014-10-18T13:48:00ZJun NAITOH
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>I think Plan A. is better because <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Switch to TCPDF from FPDF for PDF export (Closed)" href="https://www.redmine.org/issues/8312">#8312</a> supported to switch using font by changing "general_pdf_encoding" at locale yml.</p>
</blockquote>
<p>me, too. :)</p>
<a name="Plan-A-fontname-table-updated-add-Font-type"></a>
<h3 >Plan A : fontname table updated. (add Font type)<a href="#Plan-A-fontname-table-updated-add-Font-type" class="wiki-anchor">¶</a></h3>
<table>
<tr>
<th>locale</th>
<th>general_pdf_fontname: (Font type)</th>
<th>Language</th>
</tr>
<tr>
<td>ja.yml</td>
<td>kozminproregular (Non embedded Font (CID Font))</td>
<td>Japanese</td>
</tr>
<tr>
<td>ko.yml</td>
<td>hysmyeongjostdmedium (Non embedded Font (CID Font))</td>
<td>Korean (UHC)</td>
</tr>
<tr>
<td>th.yml</td>
<td>freeserif (embedded Font)</td>
<td>Thai</td>
</tr>
<tr>
<td>vi.yml</td>
<td>DejaVuSans (embedded Font)</td>
<td>Vietnamese</td>
</tr>
<tr>
<td>zh-TW.yml</td>
<td>msungstdlight (Non embedded Font (CID Font))</td>
<td>Traditional Chinese (BIG5)</td>
</tr>
<tr>
<td>zh.yml</td>
<td>stsongstdlight (Non embedded Font (CID Font))</td>
<td>Simplified Chinese (GB18030)</td>
</tr>
<tr>
<td>other yml</td>
<td>freesans (embedded Font)</td>
</tr>
<tr>
<td>etc..</td>
<td>courier, helvetica, times, symbol, zapfdingbats (Non embedded Font(Core Font))</td>
</tr>
</table> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=592462014-10-20T06:40:24ZToshi MARUYAMA
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p><a class="attachment" href="https://www.redmine.org/attachments/12477">general_pdf_fontname_r13446.patch</a> is committed in trunk <a class="changeset" title="pdf: define "general_pdf_fontname" at i18n yaml for multilingual environment (#13781) Contribute..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13458">r13458</a> and 2.6-stable <a class="changeset" title="Merged r13458 from trunk to 2.6-stable (#13781) pdf: define "general_pdf_fontname" at i18n yaml ..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/13460">r13460</a>, thanks.</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=601652014-12-02T06:32:22Zgank gu
<ul></ul><p>Jun NAITOH wrote:</p>
<blockquote>
<p>Maxime Vez wrote:</p>
<blockquote>
<p>Recently Adobe and Google released an open-source CJK font : <a class="external" href="http://blog.typekit.com/2014/07/15/introducing-source-han-sans/">http://blog.typekit.com/2014/07/15/introducing-source-han-sans/</a></p>
<p>Maybe it can help in solving this issue.</p>
</blockquote>
<p>I tried to use Adobe and Google CJK Font(han-sans), but I couldn't convert from OTF font to TTF font.<br />rbpdf library can use only a TTF font.</p>
<p>Daniel Felix wrote:</p>
<blockquote>
<p>A default in the configuration won't help on a multilingual environment.<br />Like people have issues in korean and issues posted in german for example.<br />I think this would collide and force the german output to break.</p>
</blockquote>
<p>I wrote patch.</p>
<a name="Plan-A-use-configlocalesyml-I-recommend"></a>
<h3 >Plan A. (use config/locales/*.yml) : I recommend.<a href="#Plan-A-use-configlocalesyml-I-recommend" class="wiki-anchor">¶</a></h3>
<ul>
<li>general_pdf_fontname_r13446.patch
<table>
<tr>
<th>locale</th>
<th>general_pdf_fontname: </th>
<th>Language</th>
</tr>
<tr>
<td>ja.yml</td>
<td>kozminproregular</td>
<td>Japanese</td>
</tr>
<tr>
<td>ko.yml</td>
<td>hysmyeongjostdmedium</td>
<td>Korean (UHC)</td>
</tr>
<tr>
<td>th.yml</td>
<td>freeserif</td>
<td>Thai</td>
</tr>
<tr>
<td>vi.yml</td>
<td>DejaVuSans</td>
<td>Vietnamese</td>
</tr>
<tr>
<td>zh-TW.yml</td>
<td>msungstdlight</td>
<td>Traditional Chinese (BIG5)</td>
</tr>
<tr>
<td>zh.yml</td>
<td>stsongstdlight</td>
<td>Simplified Chinese (GB18030)</td>
</tr>
<tr>
<td>other yml</td>
<td>freesans</td>
</tr>
<tr>
<td>etc..</td>
<td>Helvetica</td>
</tr>
</table></li>
</ul>
<p>This plan was considered in order to support multilingual environment.</p>
<p>If you use English locale (en.yml) and you want to Japanese characters, so please set to "general_pdf_fontname: kozminproregular" on en.yml.</p>
<a name="Plan-B-use-configurationyml-I-dont-recommend"></a>
<h3 >Plan B. (use configuration.yml) : I don't recommend.<a href="#Plan-B-use-configurationyml-I-dont-recommend" class="wiki-anchor">¶</a></h3>
<ul>
<li>pdf_font_name_r13446.patch</li>
</ul>
<p>Configuration of PDF font for non CJKV (and Thai) locale.</p>
<p>I think that this plan has the big influence in multilingual environment.</p>
</blockquote>
<p>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" ?</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=601732014-12-02T09:06:25ZToshi MARUYAMA
<ul></ul><p>gank gu wrote:</p>
<blockquote>
<p>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" ?</p>
</blockquote>
<p>You cannot because of <a href="http://en.wikipedia.org/wiki/Han_unification" class="external">Han unification</a> .</p> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=619072015-03-05T10:39:45ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/19282">Feature #19282</a>: Export unicode error.</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=653532015-08-09T06:33:16ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/20499">Defect #20499</a>: Bangla charater of PDF</i> added</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=653552015-08-09T06:33:51ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-1 priority-4 priority-default" href="/issues/20499">Defect #20499</a>: Bangla charater of PDF</i>)</li></ul> Redmine - Defect #13781: CJK(Chinese/Japanese/Korean) characters are not shown in PDF on non CJK localeshttps://www.redmine.org/issues/13781?journal_id=936362019-09-10T11:08:10Znikunj begda
<ul></ul><p>Hello i found solution for this issue:</p>
<p>1. you need to create mysql database with utf8 parameter.<br />2. go to /redmine/app/models/user.rb and replace this line and comment the default one<br />#validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\Å\/<br /> validates_format_of :login, :with => /[a-zA-ZąćęłńóśźżĄĆĘÅŃÓŚŹŻ]{5,15}(?:\+[a-zA-ZąćęłńóśźżĄĆĘÅŃÓŚŹŻ]{5,15}){0,2}/</p>
<p>or add your language characters before end '/ ' and save the file</p>
<p>now you can login with all the characters.</p>