aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion/mm-modem-helpers-cinterion.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-02-13 16:04:56 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-02-23 11:35:11 +0000
commit16df1e17e6e96f8dd0ba67003c6abb7083b9d7ec (patch)
tree464e915cf4b602510b59425534a9f9c179df1647 /plugins/cinterion/mm-modem-helpers-cinterion.c
parent63fa9eee462de9270e3ab44eab43050877982cf1 (diff)
helpers: rework normalize_operator() to use str_to_utf8()
Instead of blindly assuming that we can take whatever string given as valid UTF-8, we'll always attempt to convert from the current modem charset into UTF-8. Before we were doing this for hex-encoded UCS2, but not for example for GSM-7. And due to the now applied GSM-7 conversion, the mf627a/mf627b +COPS parsing unit tests are updated accordingly, because when converting from an input string that contains byte 0x40 ('@' in UTF-8) as if it were GSM-7, the 0x40 is taken as character 'ยก', encoded as 0xc2,0xa1 in UTF-8).
Diffstat (limited to 'plugins/cinterion/mm-modem-helpers-cinterion.c')
0 files changed, 0 insertions, 0 deletions