Reputation: 1697
I have text normalizing method, I use it to convert non-English letters into English letters only.
C# Method:
private string normalizeString(string inputWord)
{
StringBuilder stringBuilder = new StringBuilder();
foreach (char c in inputWord.Trim().ToCharArray())
{
string normalizedChar = c.ToString()
.Normalize(NormalizationForm.FormD).Substring(0, 1);
stringBuilder.Append(normalizedChar);
}
return stringBuilder.ToString();
}
Example
Ä => A
ä => a
Ö => O
ö => o
Õ => O
õ => o
Ü => U
ü => u
Upvotes: 1
Views: 2583
Reputation: 286
if you want to remove diacritics you can use Collate
for example:
select 'áéíóú' collate SQL_Latin1_General_Cp1251_CS_AS
this will return "aeiou"
Upvotes: 3
Reputation: 27927
As per this Question there's no such native function in SQL Server. What you can do is to create a CLR Function for that.
Upvotes: 1