Skip to content

Conversation

@pixelshade
Copy link

Set globally in constructor

Set globally in constructor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation here (spaces) does not match the surrounding code (tabs). Please use tabs so the formatting is consistent.

Using tabs instead of spaces. Added more info about issue fix in the
comment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't change a thread's culture from within the SDK, there are two reasons for that:

  • You may affect the host application, which may have set their own culture
  • The SDK runs in multiple threads and you are changing the culture for only one of them

Please use the correct Culture explicitly at the place where the string gets formatted. You want to use CultureInfo.InvariantCulture as the culture as it already has . as the decimal separator. I'm not sure about thousands separator though, please check that.

Peter Šulík added 3 commits November 18, 2015 14:22
Invariant culture set in double converting to string in miniJSON due to
system locale bug where “,” decimal separator was used instead of “.”
Its questionable if its ok to call it in method everytime
Decimal conversion using Invariant Culture with R parameter that should
be enough to fix problem with “,” in decimals in some cultures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants