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.
This commit is contained in:
Aleksander Morgado
2021-02-23 11:35:11 +00:00
parent 5ce97abd73
commit bc449cbe87
6 changed files with 41 additions and 20 deletions
+2 -1
View File
@@ -33,8 +33,9 @@ common_test_gsm7 (const gchar *in_utf8)
g_autoptr(GError) error = NULL;
/* Convert to GSM */
unpacked_gsm = mm_charset_utf8_to_unpacked_gsm (in_utf8, &unpacked_gsm_len);
unpacked_gsm = mm_charset_utf8_to_unpacked_gsm (in_utf8, FALSE, &unpacked_gsm_len, &error);
g_assert_nonnull (unpacked_gsm);
g_assert_no_error (error);
g_assert_cmpuint (unpacked_gsm_len, >, 0);
/* Pack */