On Tue, Apr 8, 2014 at 8:10 AM, Koen Deforche <[email protected]> wrote:

>> I checked the Haru headers and that error is
>> HPDF_INVALID_ENCODING_NAME. I have no idea why this is happening.
> The Haru version in
>> use is 2.2.1.
>
> Haru 2.2.1 does nog support utf-8 encoding. This is why you het the error.
> We could perhaps make this robust so that it stille works (with ASCII
> encoding), but still it would be more useful to use a more recent (git)
> version of haru.

Thank you, having ASCII would be great because Debian still packages 2.2.1 :-(

>From what I see in WPdfImage.C, it seems Wt was initially thought with
non-UTF-8 support in mind:

#if HPDF_VERSION_ID>=20300
  HPDF_UseUTFEncodings(pdf_);
#endif

but then forgot about that:

      font_ = HPDF_GetFont (pdf_, font_name, "UTF-8");

...

    std::string s = trueTypeFont_ ? text.toUTF8() : text.narrow();

...

      return WTextItem(WString::fromUTF8(s.substr(0, bytes)), width);


I will take a look and try to patch Wt for non-UTF-8


-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to