remove diacritics from the TitleFirstCharacter
This commit is contained in:
parent
93709ec1e9
commit
e7ef30ee6f
|
@ -40,7 +40,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
[TestCase("좀비버스", "좀\\좀비버스")]
|
||||
[TestCase("¡Mucha Lucha!", "M\\¡Mucha Lucha!")]
|
||||
[TestCase(".hack", "H\\hack")]
|
||||
[TestCase("Ütopya", "Ü\\Ütopya")]
|
||||
[TestCase("Ütopya", "U\\Ütopya")]
|
||||
|
||||
public void should_get_expected_folder_name_back(string title, string expected)
|
||||
{
|
||||
|
|
|
@ -381,13 +381,13 @@ namespace NzbDrone.Core.Organizer
|
|||
{
|
||||
if (char.IsLetterOrDigit(title[0]))
|
||||
{
|
||||
return title.Substring(0, 1).ToUpper();
|
||||
return title.Substring(0, 1).ToUpper().RemoveAccent();
|
||||
}
|
||||
|
||||
// try the second character if the first was non alphanumeric
|
||||
if (char.IsLetterOrDigit(title[1]))
|
||||
{
|
||||
return title.Substring(1, 1).ToUpper();
|
||||
return title.Substring(1, 1).ToUpper().RemoveAccent();
|
||||
}
|
||||
|
||||
// default to "_" if no alphanumeric character can be found in the first 2 positions
|
||||
|
|
Loading…
Reference in New Issue