- Регистрация
- 16.05.2014
- Сообщения
- 145
- Благодарностей
- 23
- Баллы
- 18
hi guys anyone got a solution in C that will remove letter accents like here :
http://textmechanic.com/Remove-Letter-Accents.html
example:
żźćóóąžý
I found the following code, added System.Globalization into GAC but errors appear:
As i dont have much idea about C# i am stuck.
http://textmechanic.com/Remove-Letter-Accents.html
example:
żźćóóąžý
I found the following code, added System.Globalization into GAC but errors appear:
Код:
Error in action "CS0103" "The name 'UnicodeCategory' does not exist in the current context". [Row: 6; Column: 74]
Error in action "CS0103" "The name 'CharUnicodeInfo' does not exist in the current context". [Row: 6; Column: 33]
Код:
var text = (project.Variables["string"].Value);
{
if (string.IsNullOrWhiteSpace(text))
return text;
text = text.Normalize(NormalizationForm.FormD);
var chars = text.Where(c => CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark).ToArray();
return new string(chars).Normalize(NormalizationForm.FormC);
}