Hi Jade.
Maybe one of the TB team might chime in here but I don't think there is a "simple" snippet.
Something like this is the only way I know. Ir's not very elegant. Note: this is just a rough psuedo code
{replaceregex(replaceregex(replaceregex(replaceregex(replaceregex(replaceregex(replaceregex(input, "[àáâãäåāăą]", "a", "g"), "[èéêëēėęě]", "e", "g"), "[ìíîïĩīįì]", "i", "g"), "[òóôõöøōőŏ]", "o", "g"), "[ùúûüũūůűų]", "u", "g"), "[çćčĉ]", "c", "g"), "[šşś]", "s", "g"), "[ñńň]", "n", "g")}
in php you could do somethign like this
<?php
function replaceAccentedLetters($input) {
$accentedLetters = array(
'à', 'á', 'â', 'ã', 'ä', 'å', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï',
'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ'
);
$regularLetters = array(
'a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
'n', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y'
);
foreach ($accentedLetters as $key => $value) {
$input = str_replace($value, $regularLetters[$key], $input);
}
return $input;
}
?>
Here is an example of how to use the script:
$input = "Montréal";
$output = replaceAccentedLetters($input);
echo $output; // Montreal
As you can see there are no simple solutions.