Re: Unicde characters don't show up even with utf8 encoding
Alfred Reibenschuh <[email protected]> Fri, 12 Oct 2007 09:28:44 +0200
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 turnertim wrote: > On one computer, this works fine. > > On another computer these lines defining the fonts: > > $headerfont = $pdf->corefont( "Helvetica-Bold", -encode=>"utf8"); > $font = $pdf->corefont( "Helvetica", -encode=>"utf8"); > $italicfont = $pdf->corefont( "Helvetica-Oblique", -encode=>"utf8"); > > Then when using a unicode character for trademark or bullet... they > don't show up. > > Does this mean the corefonts on that computer don't support > unicode???? Or is it a problem with my syntax? corefonts only support a limited set of 8bit encodings, yet if you use unicode (ie. utf8) strings with characters that are covered by that particular 8bit encoding pdfapi2 will transparently convert that for you. in you case you might just change -encode to latin1 to get trademark and bullet on both boxes right. what you must understand is that the environmental language and region settings have some impact in this matter. since i'm an old unix bone my settings on any box i use is: LANG=C and not en_US.latin1 or en_US.utf-8 under m$ you must verfiy that your regional setting use codepage 1252, if that is not the case you must take special precautions to get your output right. C fredo - -- Schonmal davon gehoert, dass nicht jeder linux user gleich ein programmierer ist, der alles, was er selber braucht, auch selber programmiert, installiert, patched, hacked oder portiert? Urks? Das ist doch nur eine Legende..... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHDyIsjKJMaHhpyr4RCJvQAKDbdc81LeD+rY3HYsk53pDsbiNSeACfb99n NbnMULxUpJDjAWPN+hxXAyc= =CLj+ -----END PGP SIGNATURE-----