Closed nylki closed 7 years ago
I assume your locale is using the comma as decimal point. Changing the current thread culture to System.Globalization.Culture.InvariantCulture should fix the problem.
I assume your locale is using the comma as decimal point
I actually do. I am sorry, but I have no experience with Mono; could you indicate where the change would have to be made, in the code or as a compiler argument?
in Program.cs in the Main method (which is the entry point of the application) add the following before the whole XML parsing is going on, so at the top of the method:
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
@drake7707 Thank you, that worked! :)
I'll leave the issue open for @mxgmn to decide what to do with it.
I had the same problem, i solved it in a pull request. The method he currently uses to parse strings into numbers does it with local system locale. There's an alternative that uses a culture invariant locale.
Add using System.Globalization;
in Main add:
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
This will force proper culture. Also, set Bulgaria as your region during development, it will help you a lot with fixing such stuff :)
I merged @Cookingsource 's PR, so this should be solved.
On Fedora 24, Mono JIT compiler version 4.2.4.