=?iso-8859-1?Q?RE:_=5Bic=5D_=A3_or_£ _for_UK_currency_symbol_in_Loca?= le

Kevin Walsh kevin at cursor.biz
Wed Jul 6 12:20:41 EDT 2005

John1 [list_subscriber at yahoo.co.uk] wrote:
> We operate an interchange site that sells in UK pounds.
> On a few rare occasions customers complain to us that all prices on the
> website have a ? instead of a £ sign in front of the prices.
> In Locale we have set currency_symbol to £.  Consequently the html for our
> pages contains the £ symbol rather than £
> Could this be the reason for some people getting question marks instead of
> pound signs?  i.e. Could the question mark be due to the regional settings
> of their computer or a lack of installed fonts?
> If so, should we change currency_symbol in Locale to £ instead of £
> I am a little cautious about doing this as it would also impact the plain
> text e-mail templates which use the [currency] tag.  i.e. They would
> display £ instead of a pound sign, so I would have to change any
> e-mail templates to hard code a pound sign.
For UK websites, I tend to set the currency_symbol to £ and
then use a simple filter in the emails to convert £ to GBP:

    [item-filter price2gbp][item-price][/item-filter]

The filter looks like this:

    CodeDef price2gbp Filter
    CodeDef price2gbp Routine <<EOR
    sub {
        my $val = shift;

        $val =~ s/&price;\s*/GBP /g;
        return $val;

Prices on pages look like "&pound;123.45" and prices in emails look
like "GBP 123.45".  You could modify the filter to strip the currency
altogether and add a note in the email along the lines of "all price
values are British Pounds Sterling."  The filter could even look up
the currency_symbol for itself and strip it automagically.

Perhaps Interchange could be modified to define a currency_plaintext
Locale key and use that, instead of currency_symbol, when a certain
pragma is set on a page/email.  Something to think about/discuss.

   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/

More information about the interchange-users mailing list