aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-11-22 16:10:06 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-02-23 11:35:11 +0000
commitdbdf67e9f7c55d7f70ed94449160a7ff254359a2 (patch)
tree6dcac2d9eacc27ba376e9648c8c53db32e935506 /src
parent8b590721dfdff5c4382dbc3498d92035b2d4ad64 (diff)
charsets: remove unused charset_utf8_to_hex() method
Diffstat (limited to 'src')
-rw-r--r--src/mm-charsets.c28
-rw-r--r--src/mm-charsets.h6
2 files changed, 0 insertions, 34 deletions
diff --git a/src/mm-charsets.c b/src/mm-charsets.c
index fbbe4855..2613a660 100644
--- a/src/mm-charsets.c
+++ b/src/mm-charsets.c
@@ -185,34 +185,6 @@ mm_modem_charset_hex_to_utf8 (const gchar *src,
return g_steal_pointer (&converted);
}
-gchar *
-mm_modem_charset_utf8_to_hex (const gchar *src,
- MMModemCharset charset)
-{
- const gchar *iconv_to;
- g_autofree gchar *converted = NULL;
- g_autoptr(GError) error = NULL;
- gsize converted_len = 0;
-
- g_return_val_if_fail (src != NULL, NULL);
- g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL);
-
- iconv_to = charset_iconv_from (charset);
- g_return_val_if_fail (iconv_to != NULL, FALSE);
-
- if (charset == MM_MODEM_CHARSET_UTF8 || charset == MM_MODEM_CHARSET_IRA)
- return g_strdup (src);
-
- converted = g_convert (src, strlen (src),
- iconv_to, "UTF-8//TRANSLIT",
- NULL, &converted_len, &error);
- if (!converted || error)
- return NULL;
-
- /* Get hex representation of the string */
- return mm_utils_bin2hexstr ((guint8 *)converted, converted_len);
-}
-
/* GSM 03.38 encoding conversion stuff */
#define GSM_DEF_ALPHABET_SIZE 128
diff --git a/src/mm-charsets.h b/src/mm-charsets.h
index d9542e6a..a84b7ac5 100644
--- a/src/mm-charsets.h
+++ b/src/mm-charsets.h
@@ -53,12 +53,6 @@ gchar *mm_modem_charset_byte_array_to_utf8 (GByteArray *array,
gchar *mm_modem_charset_hex_to_utf8 (const gchar *src,
MMModemCharset charset);
-/* Take a string in UTF-8 and convert it to the given charset in hex
- * representation.
- */
-gchar *mm_modem_charset_utf8_to_hex (const gchar *src,
- MMModemCharset charset);
-
guint8 *mm_charset_utf8_to_unpacked_gsm (const gchar *utf8,
guint32 *out_len);
guint8 *mm_charset_gsm_unpacked_to_utf8 (const guint8 *gsm,