How to replace accented letters with ASCII letters?

It is definitely not required, as I can do just fine striping out the punctuation and replacing white-spaces with dashes (my target languages are English and Spanish); however, I would still like to learn how to get this done, for future reference.

Best regards,
Daniel Rivas.