How to Convert Accents diacritics to plain English?

Hi Guys,

Need your help!

In the process,I get an input from a text file which is in English but sometimes it contains Accents like ü,ó,Ï,Á,Š and many). It is very tedious job to search for such accent in the file and replace it with right ones (u,o,I,A,S).

Is there any way to replace all these accents in one go?

This is a complicated issue, so it’s best resolved using your own nuget package (unless you can find a library). Unfortunately, Humanizer.Core does not handle this issue.

I did, however, find a solution to this if you wish to roll it yourself. I’ll probably be wrapping it into a package for use myself, but don’t wait on me- I’m not sure when, or if, I’ll publish the package. The linked solution is licensed under the Apache-2.0 license, so it should be ready to drag-and-drop into a .NET Framework C# project if you go that route.

Amendment: I hadn’t reviewed the code. You won’t be able to just “drop it in,” unfortunately. You probably could but you’d also need to import a lot of the supporting classes. However, you could add the Lucene.Net library to your nuget packages, if you don’t mind the weight of the entire package.

1 Like

Thanks a lot @Foxtrek_64 :slight_smile:

1 Like

I found a package DiacriticsConverter.Activities :slight_smile:

Activities in this package converts diacrtirics of Polish, Czech, English, Dutch, French, German, Hungarian, Livonian, Latvian, Russian, Slovakian, Spanish.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.