I am trying to send an SMS using a modem's REST API. It receives the message as an URL query parameter and can be configured to use the following charsets:
- "GSM"
- "IRA"
- "8859-1"
- "PCCP437"
- "UCS2"
- "HEX"
When trying to send "ünbelievablö", if I encode it as GSM following this table I end up with '%7Enbelievabl%7C'.
If I send that, I get '%7Enbelievablö' in the SMS. I assume this is due to some kind of URL encoding conflict, since '%7E' is ~ (tilde) in UTF-8 but ü (small letter u with diaeresis) in GSM. If I URL encode the already GSM encoded character (ü => %7E => %257E) I get '%7E' in the SMS still. ¨
When sending '~nbelievabl%7C' I get the correct 'ünbelievablö' string in the SMS, but I don't understand why.
What am I doing wrong? Any suggestion?