NFugue icon indicating copy to clipboard operation
NFugue copied to clipboard

Using a non-US Culture may cause errors!

Open Andis59 opened this issue 6 years ago • 0 comments

I'm Swedish and using Culture sv-SE, One of the things that this does is changing the decimal separator to a comma (,)

This leads to a lot of problem for all places that uses double.ToString or String Interpolation, e.g.

frequency = double.Parse(frequencyMatch.Groups[0].ToString());
qualifier =$"/{DefaultNoteSettings.DefaultDuration}"

They should (may) be changed to

frequency = double.Parse(frequencyMatch.Groups[0].ToString(), CultureInfo.InvariantCulture);
qualifier = FormattableString.Invariant($"/{DefaultNoteSettings.DefaultDuration}");

Andis59 avatar Sep 02 '19 13:09 Andis59