[collectd] Commas as a thousand separator

Florian Forster octo at collectd.org
Tue Feb 1 09:28:52 CET 2011


Hi Lee,

On Mon, Jan 31, 2011 at 05:40:06PM +0000, Lee Essen wrote:
> Looking at the code for the curl plugin and then utils_match.c it just
> does a strtod on the matched string which will only ever convert the
> bit before the comma.

that's right. Unfortunately, the behavior of strtod(3) depends on the
locale setting, more precisely the LC_NUMERIC environment variable as
described in locale(7).

If it was possible to set the locale on a per-thread basis, we might be
able to make this configurable for the user. I suspect locales can only
be set on a per-process basis, but I don't know for sure.

Hope this helps. Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110201/50d9974b/attachment.pgp>


More information about the collectd mailing list