diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/SeriesTitleFirstCharacterFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/SeriesTitleFirstCharacterFixture.cs index b943cea10..5b3d09d6a 100644 --- a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/SeriesTitleFirstCharacterFixture.cs +++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/SeriesTitleFirstCharacterFixture.cs @@ -41,6 +41,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests [TestCase("¡Mucha Lucha!", "M\\¡Mucha Lucha!")] [TestCase(".hack", "H\\hack")] [TestCase("Ütopya", "U\\Ütopya")] + [TestCase("Æon Flux", "A\\Æon Flux")] public void should_get_expected_folder_name_back(string title, string expected) { diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 65522587f..112232521 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -5,6 +5,8 @@ using System.Globalization; using System.IO; using System.Linq; using System.Text.RegularExpressions; +using Diacritical; +using DryIoc.ImTools; using NLog; using NzbDrone.Common.Cache; using NzbDrone.Common.Disk; @@ -411,13 +413,13 @@ namespace NzbDrone.Core.Organizer { if (char.IsLetterOrDigit(title[0])) { - return title.Substring(0, 1).ToUpper().RemoveAccent(); + return title.Substring(0, 1).ToUpper().RemoveDiacritics()[0].ToString(); } // Try the second character if the first was non alphanumeric if (char.IsLetterOrDigit(title[1])) { - return title.Substring(1, 1).ToUpper().RemoveAccent(); + return title.Substring(1, 1).ToUpper().RemoveDiacritics()[0].ToString(); } // Default to "_" if no alphanumeric character can be found in the first 2 positions diff --git a/src/NzbDrone.Core/Sonarr.Core.csproj b/src/NzbDrone.Core/Sonarr.Core.csproj index 5c4cec3dd..b4e214628 100644 --- a/src/NzbDrone.Core/Sonarr.Core.csproj +++ b/src/NzbDrone.Core/Sonarr.Core.csproj @@ -4,6 +4,7 @@ +