I read some text (known in ISO-8859-1) from a TCP socket using the read function, then I am replacing the base substring. Finally, I would like to convert the string to the equivalent of GSM.
Preferably (but not necessarily) I would do something like this:
size_t i; for (i=0; i<size; i++) { switch (string[i]) { case 65:
I prefer the switch for readability, but also reviewed if-else statements.
This works for regular ASCII characters, but the top of ISO-8859-1 causes me all the problems. Apparently, they are considered as several characters. Any help on how to proceed with the conversion would be greatly appreciated.
source share