in reply to Foreign language characters...

Perl has the complete set of Unicode data tables in Perl data structures. Try the Unicode::CharName module. The accented letters all mention the base char in the name, so you can look up the name for a character code and find that it's "LATIN SMALL LETTER A WITH RING ABOVE", then grep for what char is just "LATIN CAPITAL LETTER A".

Use the Memoize module to remember the results so each lookup is only done the first time needed.

—John