How do I remove accentuated characters from a string? Especially in IE6, I had something like this:
accentsTidy = function(s){
var r=s.toLowerCase();
I found all these a little clumsy and I'm not too expert on regular expressions, so here's a simpler version. It would be quite easy to translate it to your favourite server-side language, assuming that the string already in Unicode:
// String containing replacement characters for stripping accents
var stripstring =
'AAAAAAACEEEEIIII'+
'DNOOOOO.OUUUUY..'+
'aaaaaaaceeeeiiii'+
'dnooooo.ouuuuy.y'+
'AaAaAaCcCcCcCcDd'+
'DdEeEeEeEeEeGgGg'+
'GgGgHhHhIiIiIiIi'+
'IiIiJjKkkLlLlLlL'+
'lJlNnNnNnnNnOoOo'+
'OoOoRrRrRrSsSsSs'+
'SsTtTtTtUuUuUuUu'+
'UuUuWwYyYZzZzZz.';
function stripaccents(str){
var answer='';
for(var i=0;i=0 && chindex