I have a PerlTk app which displays billing information for mobile phone subscribers. Its a win32/64 app so I am using activestate 5.10.0. The particular chunk of code I working with looks like this:
$bill_f->Label( -text => sprintf("\$%.2f",$bill->{RENTAL}))->grid(); $bill_f->Label( -text => sprintf("\$%.2f",$bill->{USAGE}))->grid(); $bill_f->Label( -text => sprintf("\$%.2f",$bill->{OTHER}))->grid(); $bill_f->Label( -text => sprintf("\$%.2f",$bill->{TOTAL}))->grid();
I need to update the app for European users and one thing they keep asking for is to replace those pesky dollar signs with euro symbols. Ive tried using \€ in the sprintf but that doesnt work, nor have the fancier ways of using UTF-8 codes that Ive tried. Any suggestions?

In reply to How to print a Euro symbol (€) in a PerlTk Label widget. by Ba1rdsy

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.