Supprimer les accents dans une chaîne de caractères
Utile par exemple pour effectuer une recherche de texte en ne tenant pas compte des caractères accentués.
Procédure
proc remove_accents {data} {
return [::tcl::string::map -nocase {
"à" "a" "â" "a" "ä" "a" "ã" "a" "å" "a" "á" "a" "à" "a" "å" "a"
"é" "e" "è" "e" "ê" "e" "ë" "e"
"î" "i" "ï" "i" "î" "i" "í" "i" "ì" "i"
"ô" "o" "ö" "o" "õ" "o" "ø" "o" "ò" "o" "ó" "o"
"ù" "u" "û" "u" "ü" "u" "ú" "u"
"ý" "y" "ÿ" "y"
"ç" "c" "ð" "d" "ñ" "n" "š" "s" "ž" "z"
} $data]
}