RE: Unicde characters don't show up even with utf8 encoding

"Tim Turner" <[email protected]> Fri, 12 Oct 2007 08:50:38 -0400
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
I pretty much gave up on this particular issue but
More info... For anyone else running into it...

If I use corefont Helvetica bold 12 point with a 12 point lead... The
unicode characters for a bullet and trademark show up.  If I use regular
Helvetica 10 point the bullet does not show up but the trademark does.  I
also tried a true type font that I uploaded to the computer and loaded using
ttfont.  That also gave varying results at different point sizes.

After 3 hrs I just removed the bullets and used a text dash instead....  But
my technical curiosity is still bugging me about it... I will try to look
into the items Fredo suggested.

Regards,
-Tim 


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Alfred
Reibenschuh
Sent: Friday, October 12, 2007 3:29 AM
To: [email protected]
Subject: Re: [perl-text-pdf-modules] Unicde characters don't show up even
with utf8 encoding

-----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
<http://enigmail.mozdev.org> 

iD8DBQFHDyIsjKJMaHhpyr4RCJvQAKDbdc81LeD+rY3HYsk53pDsbiNSeACfb99n
NbnMULxUpJDjAWPN+hxXAyc=
=CLj+
-----END PGP SIGNATURE-----