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
Here is what you can do using ISO/IEC 8859-1 (ASCII-based standard character encoding):
192 - 197 replace with A224 - 229 replace with a200 - 203 replace with E232 - 235 replace with e204 - 207 replace with I236 - 239 replace with i210 - 214 replace with O242 - 246 replace with o217 - 220 replace with U249 - 252 replace with uSupposing x is the code of the number, perform the following for capital letters:
y = floor((x - 192) / 6)y <= 2 then z = ((y + 1) * 4) + 61 else z = (y * 6) + 61Perform the following for small letters:
y = floor((x - 224) / 6)y <= 2 then z = ((y + 1) * 4) + 93 else z = (y * 6) + 93The final answer z is the ASCII code of the required alphabet.
Note that this method works only if you are using ISO/IEC 8859-1.