aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-iconv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/e-util/e-iconv.c b/e-util/e-iconv.c
index 15f2214b73..77a7e0b8e6 100644
--- a/e-util/e-iconv.c
+++ b/e-util/e-iconv.c
@@ -273,13 +273,18 @@ const char *e_iconv_charset_name(const char *charset)
#else
ret = g_strdup_printf("ISO%s", tmp);
#endif
- } else if ((strncmp(name, "windows-", 8) == 0)
- || strncmp(name, "microsoft-", 10) == 0) {
+ } else if (strncmp(name, "windows-", 8) == 0) {
/* Convert windows-nnnnn or windows-cpnnnnn to cpnnnn */
tmp = name+8;
if (strncmp(tmp, "cp", 2))
tmp+=2;
ret = g_strdup_printf("CP%s", tmp);
+ } else if (strncmp(name, "microsoft-", 10) == 0) {
+ /* Convert microsoft-nnnnn or microsoft-cpnnnnn to cpnnnn */
+ tmp = name+10;
+ if (strncmp(tmp, "cp", 2))
+ tmp+=2;
+ ret = g_strdup_printf("CP%s", tmp);
} else {
/* Just assume its ok enough as is, case and all */
ret = g_strdup(charset);