[ic] locale - apply changes - where do the pennies go?
Mike Heins
interchange-users@icdevgroup.org
Wed Jan 15 22:08:01 2003
Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> > Switching the currency twice on a page won't work flawlessly regardless of this
> > > setting. This is a bug and I reported it in an earlier posting to interchange-core,
> > > I guess. Not easy to fix though.
> >
> > Au contraire:
> >
> > reconfig=[reconfig]
> > [calc]
> > @$Items = ();
> > $CGI->{mv_order_item} = 'os28004';
> > $CGI->{mv_todo} = 'refresh';
> > return;
> > [/calc]
> >
> > [update process]
> >
> > Default: [total-cost]
> >
> > [setlocale locale=de_DE]
> > de_DE: [total-cost]
> >
> > [setlocale locale=fr_FR]
> > fr_FR: [total-cost]
> >
> > [setlocale locale=en_US]
> > en_US: [total-cost]
> >
> > [setlocale locale=de_DE]
> > de_DE: [total-cost]
> >
>
> You changed the whole locale, not the currency alone. Try the same sample with
> [setlocale currency=..].
Aha. OK, that shouldn't be too difficult to fix.
>
> >
> > Yields for me:
> >
> > 1
> >
> > Default: $14.95
> >
> > de_DE: DM 27,64
> >
> > fr_FR: 91,61 FF
> >
> > en_US: $14.95
> >
> > de_DE: DM 27,64
> >
> > What is not working? If it cannot be described, it cannot be fixed.
> >
> > (Run on latest CVS devel.)
> >
> > Note that I am running with an environment of LC_ALL at "C". If I set it
> > to de_DE or some other locale that uses "," as a decimal separator there
> > are problems, I agree.
>
> So if ExecutionLocale isn't sufficient to solve the problem with the
> broken fractional digits, shouldn't we preset the locale in the init
> scripts or is there some other measure like a warning on startup ?
It should be sufficient. There is probably just a fault in the keys
that [setlocale currency=de_DE] sets.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
Nature, to be commanded, must be obeyed. -- Francis Bacon