mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
support European encoding in xml files
This commit is contained in:
parent
1ddc193e58
commit
2f7b0b99da
1 changed files with 14 additions and 9 deletions
|
@ -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…
Reference in a new issue