This script will convert letters with diacriticals (accent marks) in a string to the letters with no diacriticals.
OS version: Any
property letters_dia_uc : (characters of "ÁÀÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜŸ")
property letters_dia_lc : (characters of "áàâäãåçéèêëíìîïñóòôöõúùûüÿ")
property letters_nondia_uc : (characters of "AAAAAACEEEEIIIINOOOOOUUUUY")
property letters_nondia_lc : (characters of "aaaaaaceeeeiiiinooooouuuuy")
set the_string to "This is some text. ÁÀÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜŸáàâäãåçéèêëíìîïñóòôöõúùûüÿ"
return strip_diacriticals(the_string)
on strip_diacriticals(the_string)
set search_chars to letters_dia_uc & letters_dia_lc
set replace_chars to letters_nondia_uc & letters_nondia_lc
set return_string to ""
repeat with i from 1 to (count of characters of the_string)
set string_char to (character i of the_string)
considering case
if search_chars contains string_char then
repeat with j from 1 to (count of search_chars)
if (item j of search_chars) = string_char then
set return_string to return_string & (item j of replace_chars)
exit repeat
end if
end repeat
else
set return_string to return_string & string_char
end if
end considering
end repeat
return return_string as string
end strip_diacriticals