Skip to content

Commit

Permalink
override culture of thread to potentially resolve locale issues with …
Browse files Browse the repository at this point in the history
…reading xml file
  • Loading branch information
Brandon Piña committed Jan 27, 2024
1 parent 96850a6 commit 8ec5cfc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vmaf-gui/results.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using System.Xml.Linq;
Expand All @@ -16,7 +18,11 @@ public results()

public void showResults(string path)
{
var doc = XDocument.Load(path);
// Override culture of the current thread to possibly resolve locale issues with loading xml file
CultureInfo culture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture = culture;

var doc = XDocument.Load(path);

var frames = from frame in doc.Root.Descendants("frame")
select frame;
Expand Down

0 comments on commit 8ec5cfc

Please sign in to comment.