From ab4c31ec0b2c79285e24b9a117ff5e5c21f8fd71 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 14 Feb 2021 09:07:21 +0100 Subject: [PATCH] cinterion: rework mno decoding to use str_to_utf8() --- plugins/cinterion/mm-modem-helpers-cinterion.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/cinterion/mm-modem-helpers-cinterion.c b/plugins/cinterion/mm-modem-helpers-cinterion.c index 543303a5..cf18ea69 100644 --- a/plugins/cinterion/mm-modem-helpers-cinterion.c +++ b/plugins/cinterion/mm-modem-helpers-cinterion.c @@ -1523,9 +1523,15 @@ mm_cinterion_provcfg_response_to_cid (const gchar *response, mno = mm_get_string_unquoted_from_match_info (match_info, 1); if (mno && modem_family == MM_CINTERION_MODEM_FAMILY_IMT) { - mno = mm_charset_take_and_convert_to_utf8 (mno, charset); - mm_obj_dbg (log_object, "current mno: %s", mno); + gchar *mno_utf8; + + mno_utf8 = mm_modem_charset_str_to_utf8 (mno, -1, charset, FALSE, error); + if (!mno_utf8) + return FALSE; + g_free (mno); + mno = mno_utf8; } + mm_obj_dbg (log_object, "current mno: %s", mno ? mno : "none"); /* for Cinterion LTE modules, some CID numbers have special meaning. * This is dictated by the chipset and by the MNO: