emoncms/emoncms — pull request #78 by simonstamm (2013-05-20 10:22:11+00:00)
Title: Fixed floatval() and setlocale() issue

The use of [floatval()](http://php.net/manual/en/function.floatval.php) in PHP depends on the locale ([setlocale()](http://php.net/manual/en/function.setlocale.php)).

With `setlocale(LC_NUMERIC, 'en_US');` a `var_dump(floatval('0.26'));` will output:

float(0.23)

But with e.g. `setlocale(LC_NUMERIC, 'de_DE');` it will output:

float(0,23)

This causes some Vis (in specific Zoom and Smoothie) to break, because they can only handle floats with dots.

A small fix is the str_replace, but in general I think it would be better to set the `LC_NUMERIC` always to en_US.