(many) Make number-to-string conversions use invariant culture #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I discovered these errors by accident, when trying to run the test suite on Windows (for an entirely different purpose 馃檪). We had some assumptions in the unit tests which failed because the
ToString()
conversions in .NET uses theCultureInfo.CurrentCulture
by default. This means that if you have your Windows running with e.g. Swedish regional settings (which is my setup), adouble
variable with a value of123.45
will be rendered as123,45
.While this is preferable in some contexts, I think we'll go with the "safe and consistent" approach for now, if not for any other reason that the unit/integration tests currently depend on these semantics. It doesn't provide a good dev experience for people trying this out on Windows/with their machine configured to use a different locale, if they would get a bunch of silly errors.