Hi
I have a process that matches up names from 2 datatables and reports matches back to a user. I came across an issue today where a match should have been found but was excluded because the name in one of the datatables contains accents.
Made up example:
DT1
Gülçin Ekmekçi
DT2
Gulcin Ekmekci
Is there a way that I can get these names to match, maybe ignoring the accents or would i have to go through the datatable and replace them with non accented characters?
I have tried a for each loop using the solution on this FORUM POST but i think this would be slow running over a whole datatable and also i could not make it work.
Is there a way that I can replace all accented characters in a datatable without impacting performance too much?
dt.AsEnumerable.ToList.ForEach(Sub(r)
r("ColumnName") = System.Text.RegularExpressions.Regex.Replace(r("ColumnName").ToString.Normalize(System.Text.NormalizationForm.FormD),"\p{Mn}","")
End Sub
)
Thank You Yoichi!!! This both solutions worked perfectly, I’ll be making use of the solution using Invoke Code so that it will remove accents from all names in the datatable. Thank for your help with this and for sharing your knowledge. Much appreciated!!