How can you change all accented letters to normal letters in C++ (or in C)?
By that, I mean something like eéèêaàäâçc
would become
char* removeAccented( char* str ) {
char *p = str;
while ( (*p)!=0 ) {
const char*
// "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
tr = "AAAAAAECEEEEIIIIDNOOOOOx0UUUUYPsaaaaaaeceeeeiiiiOnooooo/0uuuuypy";
unsigned char ch = (*p);
if ( ch >=192 ) {
(*p) = tr[ ch-192 ];
}
++p; // http://stackoverflow.com/questions/14094621/
}
return str;
}