-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilize FastDoubleParser part 1 #1040
Conversation
…all other locales, not just ROOT. Finished parse tests
ad272d8
to
89e0d41
Compare
docs/StardustDocs/topics/parse.md
Outdated
You can also set global parser options that will be used by default in [`read`](read.md), [`convert`](convert.md), | ||
and `parse` operations: | ||
and other `parse` operations. | ||
These can be seen as a global fallback for the `parserOptions` argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we need to be simpler with "fallback" definition and give a short explanation what is this, how it influences on something or add some references who are not familiar with that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, expanded a bit on it
fun `converting String to Double in different locales`() { | ||
val currentLocale = Locale.getDefault() | ||
val systemLocale = Locale.getDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it machine dependent test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this backs up the system locale and restores it at the end of the test. During the test we set Locale.setDefault()
to be machine independant
Relates to #1039
useFastDoubleParser
parser option to true by default.FastDoubleParser
fallback mechanism to use all possible safe alternative decimal symbols for a given locale.parse
documentation on the website with the behavior of the fallback mechanism etc.