[fpc-devel] patch for formatfloat when thousandseparator=#0

Jesus Reyes jesusrmx at yahoo.com.mx
Wed Apr 15 22:33:09 CEST 2009

Hi, when using clocale unit on serveral linux distros we find that ThousandSeparator=#0 and when using a format like '#,0.00 €' with a number like 1000 it ends with '1'. If thousandseparator=',' it would be formated like '1,000.00 €' it is clear that inserting a #0 in such string when separator is #0 is the problem. Attached is patch to fix it.

Related to this problem is that with clocale unit we can find monetary separator and use it if number separator=#0, this is to make it "more delphi compatible (if one is allowed to call it so)" because under windows number separator is never #0.

It may happen that monetary separator is also #0 but in this case like when the user manually set separator to #0 is handled above.

Jesus Reyes A.

      ¡Obtén la mejor experiencia en la web! Descarga gratis el nuevo Internet Explorer 8. http://downloads.yahoo.com/ieak8/?l=mx
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thousandseparator.diff
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20090415/0ef3bd31/attachment.ksh>

More information about the fpc-devel mailing list