How to create a GSM-7 encoding in Python?
问题 The GSM-7 character set is defined as a basic mapping table + an extension character mapping table (https://en.wikipedia.org/wiki/GSM_03.38#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_.2F_GSM_03.38). Meaning that u'@' should be mapped to b'\x00' (a byte string of length 1), but u'[' should be mapped to b'\x1b<' or b'\x1b\x3c' (a byte string of length 2). I've managed to get the encoding part to work by extending the encoding_table , but I'm not sure what to do that with