You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In US, a decimal number is represented like: 1.23
But on lots of other Countries, a comma is used: 1,23
It sounds that some part of SVG::TT:Graph package is assuming that the fractional part of the number is represented using a dot, instead of a comma.
Running with a non-US LANG environment var causes it to produce warnings:
$ LANG=pt_BR.UTF-8 ./foo.pl
Argument "67,7404935030" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "99,0516306780" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "106,1340172149" isn't numeric in numeric ge (>=) at input text line 328, <DATA> line 417.
Argument "55,9961640635" isn't numeric in numeric le (<=) at input text line 321, <DATA> line 417.
Argument "-14,6486767439" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "-119,1025451855" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "-112,2608407387" isn't numeric in numeric ge (>=) at input text line 328, <DATA> line 417.
Argument "42,3969767394" isn't numeric in numeric le (<=) at input text line 321, <DATA> line 417.
Argument "119,9999999983" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "-0,0006368616" isn't numeric in addition (+) at input text line 300, <DATA> line 417.
Argument "79,5049776395" isn't numeric in numeric ge (>=) at input text line 328, <DATA> line 417.
Argument "-89,8830269324" isn't numeric in numeric le (<=) at input text line 321, <DATA> line 417.
Running the same script with:
$ LANG=C ./foo.pl
Solves the issue.
The script used for tests is this one:
#!/usr/bin/perl
use strict;
use warnings;
use SVG::TT::Graph::Pie;
my $name = "foo.svg";
my @fields = ( "Jan", "Feb", "Mar");
my @data_sales_02 = (12.1, 45.1, 21.1);
my $graph = SVG::TT::Graph::Pie->new({
'height' => 500,
'width' => 300,
'fields' => \@fields,
});
$graph->add_data({
'data' => \@data_sales_02,
'title' => 'Sales 2002',
});
open(OUT, ">$name") or die "Cannot open $name for write: $!";
printf OUT "%s", $graph->burn();
close OUT;
The text was updated successfully, but these errors were encountered:
In US, a decimal number is represented like:
1.23
But on lots of other Countries, a comma is used:
1,23
It sounds that some part of SVG::TT:Graph package is assuming that the fractional part of the number is represented using a dot, instead of a comma.
Running with a non-US LANG environment var causes it to produce warnings:
Running the same script with:
Solves the issue.
The script used for tests is this one:
The text was updated successfully, but these errors were encountered: