better handling for combined chars in song sorting (sort letter)
This commit is contained in:
1 parent
37e554fcc0
commit
1fd38bad14
1 file changed
+3
-30
+3
-30
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -612,21 +613,7 @@ namespace Vocaluxe.Base
|
|||||||
int NotLetterCat = -1;
|
int NotLetterCat = -1;
|
||||||
for (int i=0; i < _SongsSortList.Length; i++)
|
for (int i=0; i < _SongsSortList.Length; i++)
|
||||||
{
|
{
|
||||||
Char firstLetter = Char.ToUpper(_SongsSortList[i].SortString[0]);
|
Char firstLetter = Char.ToUpper(_SongsSortList[i].SortString.Normalize(NormalizationForm.FormD)[0]);
|
||||||
|
|
||||||
//Fix for german Umlaute
|
|
||||||
switch (firstLetter)
|
|
||||||
{
|
|
||||||
case 'Ä':
|
|
||||||
firstLetter = 'A';
|
|
||||||
break;
|
|
||||||
case 'Ö':
|
|
||||||
firstLetter = 'O';
|
|
||||||
break;
|
|
||||||
case 'Ü':
|
|
||||||
firstLetter = 'U';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Char.IsLetter(firstLetter))
|
if (!Char.IsLetter(firstLetter))
|
||||||
{
|
{
|
||||||
@@ -684,21 +671,7 @@ namespace Vocaluxe.Base
|
|||||||
NotLetterCat = -1;
|
NotLetterCat = -1;
|
||||||
for (int i=0; i < _SongsSortList.Length; i++)
|
for (int i=0; i < _SongsSortList.Length; i++)
|
||||||
{
|
{
|
||||||
Char firstLetter = Char.ToUpper(_SongsSortList[i].SortString[0]);
|
Char firstLetter = Char.ToUpper(_SongsSortList[i].SortString.Normalize(NormalizationForm.FormD)[0]);
|
||||||
|
|
||||||
//Fix for german Umlaute
|
|
||||||
switch (firstLetter)
|
|
||||||
{
|
|
||||||
case 'Ä':
|
|
||||||
firstLetter = 'A';
|
|
||||||
break;
|
|
||||||
case 'Ö':
|
|
||||||
firstLetter = 'O';
|
|
||||||
break;
|
|
||||||
case 'Ü':
|
|
||||||
firstLetter = 'U';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Char.IsLetter(firstLetter))
|
if (!Char.IsLetter(firstLetter))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user