mchudy / NFugue

Music programming for .NET - a port of JFugue
Apache License 2.0
18 stars 8 forks source link

Using a non-US Culture may cause errors! #11

Open Andis59 opened 5 years ago

Andis59 commented 5 years ago

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}");