diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-26 23:22:57 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-23 11:35:11 +0000 |
commit | bc449cbe87ccebccbe35f926e88a2dd110832ddf (patch) | |
tree | d307b1d18c36fb620a28fa88174ba127a369a18f /plugins | |
parent | 5ce97abd73da12b64393be798f2c294d29be2705 (diff) |
charsets: make translit optional in utf8_to_unpacked_gsm()
If the conversion is not fully compatible, the user of the method
needs to request transliteration enabled explicitly in order to avoid
returning errors in this method.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index a20c0eda..dc8f758d 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -2305,8 +2305,11 @@ encode (MMIfaceModem3gppUssd *self, guint8 *gsm, *packed; guint32 len = 0, packed_len = 0; + gsm = mm_charset_utf8_to_unpacked_gsm (command, FALSE, &len, error); + if (!gsm) + return NULL; + *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT; - gsm = mm_charset_utf8_to_unpacked_gsm (command, &len); /* If command is a multiple of 7 characters long, Huawei firmwares * apparently want that padded. Maybe all modems? |