Default currency for reports

Derek Atkins warlord at MIT.EDU
Thu Jul 31 13:51:48 CDT 2003


Greg Stark <gsstark at MIT.EDU> writes:

> Uhm, based on LANG? What does the language I speak have to do with the
> currency I use? In any case I don't set my locale because I want to be sure to
> get the C locale. The other ones often specify bizarre collating rules or
> create other confusion.

LANG is the overall umbrella over all the LC_* settings.  If you set
LANG, then setlocale() will pull in all the LC_* settings from the LANG
locale.

> There's LC_MONETARY but I'm unclear whether that specifies a currency or just
> how to format currency numbers.

Honestly, I don't know which LC_* defines the currency.  But if you
look at localeconv(3) it points you to locale(7) which says:

         /* First three chars are a currency symbol from ISO 4217.
            Fourth char is the separator.  Fifth char is ' '.  */
         char *int_curr_symbol;

A few more redirects and I found locale(5) which says:

   LC_MONETARY
       The  definition  starts with the string LC_MONETARY in the
       first column.

       There are the following keywords allowed:

       int_curr_symbol
              followed by the international currency symbol. This
              must  be a 4-character string containing the inter-
              national currency symbol as defined by the ISO 4217
              standard  (three  characters) followed by a separa-
              tor.

       currency_symbol
              followed by the local currency symbol.

> I suspect my problem is that I set up my accounts a while ago and have been
> upgrading. So I never got to set the default currency. Thanks.

Could be...  A number of things can get unhappy if your locale
currency isn't one you use a lot.

> greg

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list