[pygtk] Displaying currency symbols in pyGTK

Tony Nelson tonynelson at georgeanelson.com
Wed Jun 18 22:35:36 WST 2008


At 8:33 AM -0500 6/18/08, Robert Boehne wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>I'm attempting to do what should be simple, and that is display currency
>symbols in a pango markup label widget.
>However, when attempting to display the Pound Sterling symbol for the UK
>currency,
>I can get it to runder in a python prompt easily:
>
>|>> print u'\u001E'
><prints pound sterling symbol>
>
>but then if I put that in a gtk label it displays as a box with 00
>across the top and 1E across the bottom.
 ...

That's a "missing symbol" character.  The usual character code the for
Pound sign would not be in the Control range 0000-001F, but would be larger
than 0020 (Space), usually 0023 (Pound sign, though the glyph depends on
the locale -- here in the US, it would show a Sharp sign) or 00A3, the
Latin1 Pound sign.
-- 
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>


More information about the pygtk mailing list