![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, is there any other way to remove diacritics in .NET, than StringBuilder normalized = new StringBuilder("aáùø".Normalize(NormalizationForm.F ormD)); for (int i = 0; i < normalized.Length; i++) if (char.GetUnicodeCategory(normalized[i]) == UnicodeCategory.NonSpacingMark) { normalized.Remove(i, 1); i--; } ? Jan |
#3
| |||
| |||
|
|
Well, get the improved code from here: http://blogs.msdn.com/michkap/archiv...19/376617.aspx and note that I point out the semantic flaw here: http://blogs.msdn.com/michkap/archiv...4/4734456.aspx After I finish the current series on sort keys I'll be posting some solution ideas to the problem raised there. There is no other way in the framework though, sorry. -- MichKa [Microsoft] Fundamentals Technical Lead Windows International Blog: http://blogs.msdn.com/michkap This posting is provided "AS IS" with no warranties, and confers no rights. "Jan Kucera" <miloush (AT) community (DOT) nospam> wrote in message news:610794DE-F136-4AC6-8899-72C89BD153E3 (AT) microsoft (DOT) com... Hi, is there any other way to remove diacritics in .NET, than StringBuilder normalized = new StringBuilder("aáùø".Normalize(NormalizationForm.F ormD)); for (int i = 0; i < normalized.Length; i++) if (char.GetUnicodeCategory(normalized[i]) == UnicodeCategory.NonSpacingMark) { normalized.Remove(i, 1); i--; } ? Jan |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |