title: Converting an ISO-8859-1 string to a GSM string in C
body: <p>I read some text (known to be in ISO-8859-1) from a TCP socket using the read function, then I do some basic substring replacing. Finally I would like to convert the string into the GSM equivalent.</p>
  
  <p>Preferably (but not necessarily) I would do something like this:</p>
  
  <pre><code>size_t i;
  for (i=0; i&lt;size; i++) {
    switch (string[i]) {
      case 65:
        //Convert this character
      case 163:
        //Convert this character (the pound symbol £)
    }
  }
  </code></pre>
  
  <p>I prefer the switch for readability, but have considered if-else statements as well.</p>
  
  <p>This works for the normal ASCII characters, but the top part of the ISO-8859-1 is causing me all kind of problems. Apparently they are considered as multiple characters. Any help on how to proceed with the conversion will be much appreciated.</p>