Git Product home page Git Product logo

Comments (7)

petersvp avatar petersvp commented on April 29, 2024 1

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 :)

from wavefunctioncollapse.

drake7707 avatar drake7707 commented on April 29, 2024

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.

from wavefunctioncollapse.

nylki avatar nylki commented on April 29, 2024

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?

from wavefunctioncollapse.

drake7707 avatar drake7707 commented on April 29, 2024

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;

from wavefunctioncollapse.

nylki avatar nylki commented on April 29, 2024

@drake7707 Thank you, that worked! :)

I'll leave the issue open for @mxgmn to decide what to do with it.

from wavefunctioncollapse.

Cookingsource avatar Cookingsource commented on April 29, 2024

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.

from wavefunctioncollapse.

mxgmn avatar mxgmn commented on April 29, 2024

I merged @Cookingsource 's PR, so this should be solved.

from wavefunctioncollapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.