Handling extension character table of GSM 7 bit default alphabet | Telit Cinterion IoT Developer Community
October 18, 2018 - 12:19am, 2093 views
How does a programmer, who uses gsm-7bit, know when a character from the extension character table is being transmitted to application ?
I understand now that gsm-7bit characters below 32, as well as the '\' and '"' characters themselves, are sent using the '\nn' notation, where nn is the hex digits for the character value in gsm-7bit. Are the characters in the extension character table sent in the same way ?
In the GSM 7-bit default alphabet characters from the extension character table use two bytes where the first character is ESC (\x1b). With the Gemalto-specific \XX escaping a USSD response containing a Euro sign looks like this:
+CUSD: 2,"Ihr Guthaben betr{gt: 42.00\1Be. Jetzt auch Ihr Guthaben aufladen: einfach *103*Aufladenummer# und die H|rertaste eingeben.",15
Regards,
Reinhard
Hello,
For the output of characters from extended list the same rule applies - all the characters with a value below hexadecimal 0x20 are escaped as \XX in non-UCS2 mode.
These characters from extended list are a little different because each one is preceded with 0x1B - special escape character in GSM. So for example the code for the Euro sign is 0x1B65. It takes 2 signs to send it in GSM (0x1B and 0x65). As 0x1B is below 0x20 it would be displayed in \XX escape form (0x5C 0x31 0x42). So finally for Euro sign the module would output the following sequence of character codes 0x5C 0x31 0x42 0x65. As 0x65 is the code of 'e' sign the terminal program may display it as '\1Be'. To see the character codes you can use a terminal which can display the output as hex.
Best regards,
Bartłomiej