Latinize strings in C# (æøå = aoa)
I got tired of spreading search and replaces around my projects where I need them to handle international letter input, but convert them to ASCII for some reason (may be an external API that only accepts ASCII input f.ex).
Then I made this: https://github.com/AlexanderBrevig/String.Latinize
//using Latinize; //remember to use Latinize namespace
Console.WriteLine("äæåÄÆÅ çÇ éèêÉÈÊ øö".Latinize());
//=> aaaAAA cC eeeEEE oo
//more letters supported
Written by Alexander Brevig
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Csharp
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#