How do get all the special characters even?

Primarily, you need a font that supports the desired character(s) (= does have a glyph for it).  And with characters outside of the Latin-1 range ('£' is not one of them), you want to use Unicode, which (according to my tests) means you can't use the core fonts any longer, but need to switch to using TrueType fonts, for example (see also Re^2: PDF::API2 / unicode characters).

Depending on where the special characters are coming from - i.e. from literal strings within the source, from files outside of the program, etc. - you need to use utf8 (when your source is UTF-8 encoded), and maybe use feature 'unicode_strings' (avoids a number of more subtle legacy issues and ambiguities with Perl's handling of Unicode (works with newer perls only)), and/or set the PerlIO encoding layer correctly for the respective file handles that the special character are read from.

As for the letter A in front of £ (I suppose you really meant Â), the problem most likely is that your source code is in UTF-8, but you did not tell Perl about it (see paragraph above) — the UTF-8 encoding of the pound sign is the two bytes \xc2 \xa3, which when incorrectly interpreted as two Latin-1 characters, renders as '£'.


In reply to Re^5: PDF::API2 Questions by Eliya
in thread PDF::API2 Questions by akwe-xavante

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.