aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Ewing <lewing@ximian.com>2001-10-13 10:22:35 +0800
committerLarry Ewing <lewing@src.gnome.org>2001-10-13 10:22:35 +0800
commit8a59f7a4e9f845ea14a98f7243b332cdd39e9671 (patch)
treeffd7e31188d45a55622cac2914352f9a93fb6c31
parent35ee1586fc9f5726b2921cba303f2152362c7906 (diff)
downloadgsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar.gz
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar.bz2
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar.lz
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar.xz
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.tar.zst
gsoc2013-evolution-8a59f7a4e9f845ea14a98f7243b332cdd39e9671.zip
(e_iconv_charset_name): fix microsoft fix.
2001-10-12 Larry Ewing <lewing@ximian.com> (e_iconv_charset_name): fix microsoft fix. svn path=/trunk/; revision=13649
-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);