support European encoding in xml files

pull/702/head
Luke Pulverenti 12 years ago
parent 1ddc193e58
commit 2f7b0b99da

@ -1,5 +1,6 @@
using System.Globalization;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Entities;
@ -65,8 +66,11 @@ namespace MediaBrowser.Controller.Providers
item.Genres.Clear();
item.People.Clear();
// Use european encoding as it will accept more characters
using (var streamReader = new StreamReader(metadataFile, Encoding.GetEncoding("ISO-8859-1")))
{
// Use XmlReader for best performance
using (var reader = XmlReader.Create(metadataFile, settings))
using (var reader = XmlReader.Create(streamReader, settings))
{
reader.MoveToContent();
@ -82,6 +86,7 @@ namespace MediaBrowser.Controller.Providers
}
}
}
}
private readonly CultureInfo _usCulture = new CultureInfo("en-US");

Loading…
Cancel
Save