sycn with 0.8.8cvs11
[claws.git] / src / procmime.c
index e481db574a0f85985b49bc1938c60ca670182a14..97585cc3c1128c678225241330a30a78f8be88bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@
 #  include "rfc2015.h"
 #endif
 
 #  include "rfc2015.h"
 #endif
 
-#include "prefs.h"
+#include "prefs_gtk.h"
 
 static GHashTable *procmime_get_mime_type_table        (void);
 
 
 static GHashTable *procmime_get_mime_type_table        (void);
 
@@ -793,7 +793,7 @@ void renderer_write_config(void)
                        renderer->renderer);
        }
 
                        renderer->renderer);
        }
 
-       if (prefs_write_close(pfile) < 0) {
+       if (prefs_file_close(pfile) < 0) {
                g_warning("failed to write configuration to file\n");
                return;
        }
                g_warning("failed to write configuration to file\n");
                return;
        }
@@ -1238,10 +1238,14 @@ EncodingType procmime_get_encoding_for_charset(const gchar *charset)
        else if (!strncasecmp(charset, "ISO-2022-", 9) ||
                 !strcasecmp(charset, "US-ASCII"))
                return ENC_7BIT;
        else if (!strncasecmp(charset, "ISO-2022-", 9) ||
                 !strcasecmp(charset, "US-ASCII"))
                return ENC_7BIT;
+       else if (!strcasecmp(charset, "ISO-8859-5") ||
+                !strncasecmp(charset, "KOI8-", 5) ||
+                !strcasecmp(charset, "Windows-1251"))
+               return ENC_8BIT;
+       else if (!strncasecmp(charset, "ISO-8859-", 9))
+               return ENC_QUOTED_PRINTABLE;
        else
                return ENC_8BIT;
        else
                return ENC_8BIT;
-               /* return ENC_BASE64; */
-               /* return ENC_QUOTED_PRINTABLE; */
 }
 
 EncodingType procmime_get_encoding_for_file(const gchar *file)
 }
 
 EncodingType procmime_get_encoding_for_file(const gchar *file)