This project is read-only.
2
Vote

Parsing numbers of type double

description

Hi

We found out that all the parsing is done without specifying the culture.

That has an effect that if you call SearchExtension.Search with fuzzy value of "0.8" that value gets parsed to 0.8 if the current culture is en. But a problem occurs if the current culture is let say sl-SI and the value "0.8" gets parsed to 8 and produces an incorrect search. The same parsing is used through the whole project.

As we understand the parsing of the fuzzy variable from string to double and the config values should be done with the CultureInfo.InvariantCulture. Something like this:
double.TryParse(fuzzieness, NumberStyles.Number, CultureInfo.InvariantCulture, out fuzzy)

comments