[ic] 4.9.4: [calc] and [currency] hosed - locale problem?

Toni Mueller interchange-users@icdevgroup.org
Fri Dec 13 17:49:01 2002


Hello,

we're running a 4.9.4 demo shop internally where we experiment.
This shop - foundation with red theme and soft goods - can be
used to illustrate a problem with [calc] and [currency] which
we also have with a different shop. To reproduce, select the
item 90773sh - Automotive Strategy Report - and view it in the
flypage. The item costs $89.99. Now change the flypage like this:


$ rcsdiff -u flypage.html 
===================================================================
RCS file: RCS/flypage.html,v
retrieving revision 1.1
diff -u -r1.1 flypage.html
--- flypage.html        2002/12/13 22:26:24     1.1
+++ flypage.html        2002/12/13 22:32:51
@@ -142,7 +142,15 @@
        <table width="100%">
        <tr>
          <td align="left">
-               Price: <b>[item-price]</b>
+               Price: <b>[item-price]</b><br>
+               error generating code:<br>
+               [calc] [item-price noformat] * 0.16[/calc]<br>
+               [calc]89.99 * 0.16[/calc]<br>
+               [currency][calc]89.99 * 0.16[/calc][/currency]<br>
+               [currency][calc]8.99 * 0.16[/calc][/currency]<br>
+               [calc]8.99[/calc]<br>
+               [currency][calc]8.99[/calc][/currency]<br>
+
          </td>
          <td align="right">


This renders on my computer like this:

Price: $89.99
error generating code:
15,84
14,3984
$14.00
$1.00
8,99
$8.00


Obviously, there's some gross miscalculation going on...
The language is set to LANG=de_DE@euro system wide, but
running Interchange like

$ env - LANG=C ~/interchange/bin/restart

still produces the same error. I'm running Perl 5.8 on Debian 'sid'.

What gives?


Best,
--Toni++