Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^6: PDF::Template and character encodings

by geektron (Curate)
on Oct 16, 2007 at 17:15 UTC ( #645228=note: print w/replies, xml ) Need Help??

in reply to Re^5: PDF::Template and character encodings
in thread PDF::Template and character encodings

re OP and problematic character: the top half of that 'pipe' character looks more like a dot, which is why i thought it was a 'j'. (it's supposed to be an a-accent, not a-grave)

setting the pdf_encoding='utf8' also blows up with the same "can't find encoding" error.

I'm reading up on Encode, though I'm not sure if I need and encode/decode sequence or a simpler transform.

Replies are listed 'Best First'.
Re^7: PDF::Template and character encodings
by shmem (Chancellor) on Oct 16, 2007 at 17:51 UTC
    Erm, yes, it's an a-accent (or a-acute). Fixed in previous post.

    Looks definitely like utf-8 data not passed as such. Try

    use Encode qw(from_to); ... while($r = $sth->fetchrow_hashref()) { from_to($r->{$_},"utf8","latin1") for keys %$r; }

    or such, and try with iso8859-1. How did the iso10646-1 font work?

    I have no experience with pdflib and PDF::Template (is pdflib an external library?) and there might be more settings that interfere, e.g. what is your systems default charset? Is the charset of your shell the system charset, or does it differ?


    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      no luck with the iso10646-1 font.

      the to_from is dropping off the accented character and everything after it ... Terán becomes Ter ...

      and yes, PDFlib is an external library. i suspect the problem essentially lies there ... not being too well versed in character set issues, i'm not sure what the system default is. i could force PDFlib to use another character set (by pulling in pdflib_pm and forcing a value into <code> $pdflib_pm:PDF_character_enc

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://645228]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2023-06-01 09:26 GMT
Find Nodes?
    Voting Booth?

    No recent polls found