Is there is a more efficient way to remove accents from string without make an big array with the characters to replace?
For example:
removeaccents("áèfoo")
Output:
aefoo
In the ASCII table there no accents, I have no idea how to do this. Thanks in advance. 🙂
Sounds like you’re looking for
unac(). From the man page:I couldn’t find the download page (I think it’s meant to be here, but the link is currently 404ing). If you’re on ubuntu, you can get it with:
Assuming you’re using gcc, once it’s installed you’ll need to add
-lunacto your compiler options (to tell the compiler to link with the unac library).