In many cases in can be useful to be able to “sanitize” foreign characters such as accented characters with their equivalent non-accented characters.
For instance, when trying to create a zip file in Windows (SendTo -> Compressed (zipped) folder) as it will complain if files include such characters.
Another use is when creating/naming Folders, such characters have no place (this also includes specials characters and spaces).
For example, I was looking to convert French accented characters into their English counterpart. I didn’t want to use any of the extended ascii characters since they can be the source of potential problems. So I wanted to easily switch
ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ
to
AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy
The API Approach
So, how exact could we convert a string? Well, many years ago (I think back in 2012), I came across the following that I’ve only tweak a little (added error handling and x64 declaration). Sadly, I don’t remember where I came across it, but I know it can be useful to some.




