From 8a59f7a4e9f845ea14a98f7243b332cdd39e9671 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sat, 13 Oct 2001 02:22:35 +0000 Subject: (e_iconv_charset_name): fix microsoft fix. 2001-10-12 Larry Ewing (e_iconv_charset_name): fix microsoft fix. svn path=/trunk/; revision=13649 --- e-util/e-iconv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'e-util') 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); -- cgit