[Mono-bugs] [Bug 324019] Int32.Parse does not support trailing currency symbol

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 4 02:30:05 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=324019

User atsushi at ximian.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=324019#c3





--- Comment #3 from Atsushi Enomoto <atsushi at ximian.com>  2008-08-04 00:30:05 MDT ---
Created an attachment (id=231444)
 --> (https://bugzilla.novell.com/attachment.cgi?id=231444)
proposed fix, not tested yet

It's rather about locale data issue. The following code shows the cause of the
bug:

    CultureInfo culture = new CultureInfo ("nl-BE");
    Console.WriteLine (culture.NumberFormat.CurrencyPositivePattern);
    culture.NumberFormat.CurrencyPositivePattern = 2;
    Console.WriteLine (culture.NumberFormat.CurrencyNegativePattern);
    culture.NumberFormat.CurrencyNegativePattern = 12;
    Console.WriteLine ((-3).ToString ("c", culture));
    int x = int.Parse ((-3).ToString ("c", culture), NumberStyles.Currency,
culture);
    Console.WriteLine (x);


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list