Bug 53334 - es-US Culture wrong number formatting
Summary: es-US Culture wrong number formatting
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 4.8.0 (C9)
Hardware: Other Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2017-03-15 00:26 UTC by Diego
Modified: 2017-03-20 12:50 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test project (55.53 KB, application/zip)
2017-03-15 00:26 UTC, Diego
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Diego 2017-03-15 00:26:32 UTC
Created attachment 20327 [details]
Test project

Goood day Xamarin team support

In IOS only, using the latest Xamarin Forms stable version, most of culture combinations working fine but "es-US" culture info is wrongly applying formatting over the NumberGroupSeparator, after the first group, next groups is no applied the separator.

For instance: 
value = 123456789

this.NumberUSA = value.ToString("N0", new CultureInfo("es-US"));       // 123456,789
this.NumberUSA = value.ToString("N0", new CultureInfo("en-US"));       // 123,456,789
this.NumberEspana = value.ToString("N0", new CultureInfo("es-ES"));    // 123.456.789
this.NumberColombia = value.ToString("N0", new CultureInfo("es-CO"));  // 123.456.789
this.NumberArgentina = value.ToString("N0", new CultureInfo("es-AR")); // 123.456.789

As we can see, the first "es-US" culture formatting is wrong.
All others are fine.

The attached test app project is used to verify the reported case.
Comment 1 Timothy Risi 2017-03-15 08:14:07 UTC
I can confirm I'm getting the same error, but this looks like it's actually a bug with Mono as opposed to XI itself.  I get the same output if I use the given code sample in a .net console project on mac.
Comment 2 Marek Safar 2017-03-16 09:25:48 UTC
Fixed in master
Comment 3 Diego 2017-03-20 12:50:00 UTC
After one bug is fixed in master, how long it will take to be released in the next stable version. If this fix is in a pre-release version, which one I have to use, or how could I use it?

Thanks in advance.