[Mono-dev] Bad number format settings on Mono 3.0 and Mac OS X

Eddy Zavaleta eddy at mictlanix.org
Thu Oct 25 21:31:31 UTC 2012

Hi everyone,

I have just noticed a bad behavior in number format using Mono 3.0 on Mac
I have mexican locale settings: Separators are "." for decimal and "," for
thousands. And mono uses it backwards (or ignore it and uses others

Let's see the following program.

// Test.cs
using System;

class Test
public static void Main (string[] args)
string str = "2.2";
decimal num = 2.2m;

Console.WriteLine ("string: {0}", str);
Console.WriteLine ("decimal.Parse: {0}", decimal.Parse(str));
 Console.WriteLine ("decimal: {0}", num);

Mono 2.10.9 Output:
string: 2.2
decimal.Parse: 2.2
decimal: 2.2

Mono 3.0 Output:
string: 2.2
decimal.Parse: 22
decimal: 2,2

As mono 2.10.9 returns expected results it seems like a regression.

Eddy Zavaleta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20121025/ece3744a/attachment.html>

More information about the Mono-devel-list mailing list