aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-11-22 15:02:07 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-02-23 11:35:10 +0000
commit38a4a9c842bcb0c87bca7b1a5595556fe2c144fc (patch)
tree99c0ce8cd9b631fa73bc8a9b249f66145343c73c /src
parenta025e83e5ab10147861334fd94682fdd20fb69d2 (diff)
charsets: remove HEX charset type
This is no real charset, it is the fake one we used to represent a UCS2 hex-encoded string.
Diffstat (limited to 'src')
-rw-r--r--src/mm-charsets.c10
-rw-r--r--src/mm-charsets.h3
2 files changed, 1 insertions, 12 deletions
diff --git a/src/mm-charsets.c b/src/mm-charsets.c
index 19d1874c..acddf0a8 100644
--- a/src/mm-charsets.c
+++ b/src/mm-charsets.c
@@ -42,7 +42,6 @@ static const CharsetEntry charset_map[] = {
{ "8859-1", NULL, "ISO8859-1", "ISO8859-1//TRANSLIT", MM_MODEM_CHARSET_8859_1 },
{ "PCCP437", "CP437", "CP437", "CP437//TRANSLIT", MM_MODEM_CHARSET_PCCP437 },
{ "PCDN", "CP850", "CP850", "CP850//TRANSLIT", MM_MODEM_CHARSET_PCDN },
- { "HEX", NULL, NULL, NULL, MM_MODEM_CHARSET_HEX },
{ "UTF-16", "UTF16", "UTF-16BE", "UTF-16BE//TRANSLIT", MM_MODEM_CHARSET_UTF16 },
};
@@ -773,11 +772,6 @@ mm_charset_take_and_convert_to_utf8 (gchar *str,
utf8 = str;
break;
- case MM_MODEM_CHARSET_HEX:
- /* We'll assume that the HEX string is really valid ASCII at the end */
- utf8 = str;
- break;
-
case MM_MODEM_CHARSET_GSM:
utf8 = (gchar *) mm_charset_gsm_unpacked_to_utf8 ((const guint8 *) str, strlen (str));
g_free (str);
@@ -903,10 +897,6 @@ mm_utf8_take_and_convert_to_charset (gchar *str,
encoded = str;
break;
- case MM_MODEM_CHARSET_HEX:
- encoded = str;
- break;
-
case MM_MODEM_CHARSET_GSM:
encoded = (gchar *) mm_charset_utf8_to_unpacked_gsm (str, NULL);
g_free (str);
diff --git a/src/mm-charsets.h b/src/mm-charsets.h
index 14a8b375..233ea4ed 100644
--- a/src/mm-charsets.h
+++ b/src/mm-charsets.h
@@ -27,8 +27,7 @@ typedef enum {
MM_MODEM_CHARSET_UCS2 = 1 << 4,
MM_MODEM_CHARSET_PCCP437 = 1 << 5,
MM_MODEM_CHARSET_PCDN = 1 << 6,
- MM_MODEM_CHARSET_HEX = 1 << 7,
- MM_MODEM_CHARSET_UTF16 = 1 << 8,
+ MM_MODEM_CHARSET_UTF16 = 1 << 7,
} MMModemCharset;
const gchar *mm_modem_charset_to_string (MMModemCharset charset);