-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Example progressbar1/2/3.pl
$value = $progressbar->VALUE;
Returns a string: "0.002" on a System with locale where "." is the decimal mark.
When you use this value and set it back to any variable or use it in e.g. comparison operator like "<"
it is automatically converted to a number.
In some countries the decimal mark is not a point, it is a ",". The return string you get is: "0,002". When you use this in a numeric context e.g. comparison you get the 'Argument "0,002.." isn't numeric in ...' error.
Workaround:
After reading "numerical" values from a widget do after reading
$var =~ tr/,/./;
Better solution:
Change the API, return real numeric values, not strings.
Other countries using the ",":
https://en.wikipedia.org/wiki/Decimal_mark
Metadata
Metadata
Assignees
Labels
No labels