[PATCH] sms-part-3gpp: decode Unicode SMS with non-BMP code points

Ben Chan benchan at chromium.org
Sat Dec 16 02:03:12 UTC 2017


 On Fri, Dec 15, 2017 at 1:16 AM Aleksander Morgado wrote: > > Probably a
good change; will test it once I have a chance. > > But regarding the last
fallback, why is it better to return an empty > string than NULL? I assume
that we return NULL to indicate an error in > parsing, which is what
happens here if we cannot do UCS2 or UTF-16 > translations. My initial
thought was to match how the code handles the case when encoding isn't GSM7
or UCS-2, i.e. } else { g_warn_if_reached (); utf8 = g_strdup (""); } But
if the following warning is preferred, I can undo this change.
2017-12-16T10:53:58.844064+09:00 WARNING ModemManager[29345]:
(mm-sms-part-3gpp.c:701):mm_sms_part_3gpp_new_from_binary_pdu: runtime
check failed: (mm_sms_part_get_text (sms_part) != NULL)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20171216/afd1b656/attachment.html>


More information about the ModemManager-devel mailing list