Redmine: Issueshttps://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292012-11-05T21:21:03ZRedmine
Redmine Redmine - Defect #12309 (Closed): rfpdf fails to include htmlentities gem, even when installed, t...https://www.redmine.org/issues/123092012-11-05T21:21:03ZC Tibirna
Situation:
<ul>
<li>redmine 1.4-stable of today (2012-11-05)</li>
<li>rfpdf as coming installed with redmine</li>
<li>htmlentities-4.3.1 installed</li>
<li>wiking <a class="changeset" title="0.3.0" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/27">r27</a></li>
</ul>
Symptoms:
<ul>
<li>wiking has a few default behaviors for replacing quotes ("'"), short and long dashes with their htmlentities representations:
<ul>
<li>' => ’</li>
<li>-- => –</li>
<li>--- => —</li>
</ul>
</li>
<li>rfpdf should convert these htmlentities back to UTF characters, but fails</li>
<li>results a PDF output which, e.g. in French, it's barely readable ( <code>"it's" ==> "it’s; "je l'ai" => "je l’ai"</code>) etc.</li>
</ul>
Investigation results:
<ul>
<li>it came out that rfpdf fails to load the <code>htmlentities</code> gem. There is code to (optionnaly) do it in rfpdf/init.rb, but, even when htmlentities is correctly installed, the loading of that module fails.</li>
<li>in the local configuration, in order to load <code>htmlentities</code> as installed with <code>gem</code>, one has to <br /><pre>
require 'rubygems'
require 'htmlentities'
</code></pre<br />Only the second is not enough.</li>
</ul></pre>