-
Notifications
You must be signed in to change notification settings - Fork 610
Description
I am observing strange behaviour when using the Morbo server of Mojolicious on Windows under the latest Perls.
-
Windows 11 with German settings.
-
No language/locale related settings in environment.
-
Same behaviour observed on two different computers.
-
Strawberry Perl 5.42.0.1 and Mojolicious 9.42 shows the problem shown below.
-
Strawberry Perl 5.40.2.2 with the included distributions has the same problem.
-
Strawberry Perl 5.38.4.1 and Mojolicious 9.42 works fine.
-
My first bug report: locale problem mojolicious/mojo#2302
-
A similar issue has been described here: Perl as service locale issue StrawberryPerl/Perl-Dist-Strawberry#270
-
I have not found a simpler way to trigger the wrong behaviour.
Steps to Reproduce
This Mojolicious app.pl:
use Mojolicious::Lite -signatures;
get '/' => sub ($c) {
my $f = 1.5;
$c->render( text => "\$f is $f and 1/2 is " . ( 1 / 2 ) );
};
app->start;Start the app with morbo ./app.pl.
Description
$f is 1 and 1/2 is 0,5 is shown in the browser.
This is wrong. Note the missing decimal places and the comma as the decimal separator.
Expected behavior
$f is 1.5 and 1/2 is 0.5 is shown in the browser.
This works correctly in all configurations when the app is started with ./app.pl daemon instead of morbo.
It works correctly also with morbo under Strawberry Perl 5.38.4.1 and Mojolicious 9.42.