--- src/mime.h	2006-08-03 13:39:21.000000000 +0200
+++ src/mime.h	2007-06-30 09:49:30.000000000 +0200
@@ -31,6 +31,7 @@
 extern int Slrn_Fold_Headers;
 extern int Slrn_Use_Meta_Mail;
 extern char *Slrn_MetaMail_Cmd;
+extern char *Slrn_Fallback_Input_Charset;
 
 
 #endif /* _SLRN_MIME_H */
--- src/startup.c	2006-09-03 16:56:11.000000000 +0200
+++ src/startup.c	2007-06-08 19:30:02.000000000 +0200
@@ -742,6 +742,7 @@
 #else
      {"charset", NULL},
 #endif
+     {"fallback_charset", &Slrn_Fallback_Input_Charset},
 #ifndef VMS
      {"sendmail_command", &Slrn_SendMail_Command},
 #endif
--- src/charset.c	2007-01-26 21:38:22.000000000 +0100
+++ src/charset.c	2007-06-28 17:29:48.000000000 +0200
@@ -77,6 +77,21 @@
 }
 
 #ifdef HAVE_ICONV_H
+iconv_t slrn_iconv_open(const char *tocode, const char *fromcode)
+{
+  iconv_t cd;
+
+   if (((cd = iconv_open(tocode, fromcode)) == (iconv_t)(-1)) && (Slrn_Fallback_Input_Charset != NULL) )
+   {
+     /* try fallback charset if it didn't work the first time*/
+     cd = iconv_open(tocode, Slrn_Fallback_Input_Charset);
+   }
+   return cd;
+}
+#endif
+
+
+#ifdef HAVE_ICONV_H
 /* returns the converted string, or NULL on error or if no convertion is needed*/
 static char *iconv_convert_string(iconv_t cd, char *in_str, int offset, size_t len, int test, int *error)
 {
@@ -173,11 +188,11 @@
    iconv_t cd;
    char *tmp;
 
-   if ((cd = iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
-     {
-	slrn_error (_("Can't convert %s -> %s\n"), from_charset, to_charset);
-	return NULL;
-     }
+   if ((cd = slrn_iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
+   {
+     slrn_error (_("Can't convert %s -> %s\n"), from_charset, Slrn_Fallback_Input_Charset);
+     return NULL;
+   }
    tmp = iconv_convert_string(cd, str, offset, len, test, NULL);
    iconv_close(cd);
    return tmp;
@@ -247,7 +262,7 @@
    char *tmp;
    struct Slrn_Article_Line_Type *line=a->lines;
 
-   if ((cd = iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
+   if ((cd = slrn_iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
      {
 	slrn_error (_("Can't convert %s -> %s\n"), from_charset, to_charset);
 	return -1;
@@ -283,7 +298,7 @@
    
    iconv_t cd;
    
-   if ((cd = iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
+   if ((cd = slrn_iconv_open(to_charset, from_charset)) == (iconv_t)(-1))
      {
 	slrn_error (_("Can't convert %s -> %s\n"), from_charset, to_charset);
 	return -1;
--- src/version.h	2007-06-30 09:50:48.000000000 +0200
+++ src/version.h	2007-06-29 18:34:03.000000000 +0200
@@ -25,2 +25,2 @@
-#define PATCH_LEVEL "2"
-#define SLRN_RELEASE_DATE "2005-02-17"
+#define PATCH_LEVEL "2.1"
+#define SLRN_RELEASE_DATE "2007-07-17"
--- src/version.c       2006-08-02 23:42:08.000000000 +0200
+++ src/version.c       2007-07-27 16:22:23.000000000 +0200
@@ -80,6 +80,12 @@
      {NULL, 0}
 };
 
+static char *included_patches[] =
+{
+ "fallback_charset",
+ ""
+};
+
 static void show_compile_time_options (void)
 {
    Compile_Option_Type *opt;
@@ -171,6 +177,17 @@
    fprintf (stdout, _("  Default posting mechanism: %s\n"),
            slrn_map_object_id_to_name (1, SLRN_DEFAULT_POST_OBJ));
 
+   if(*included_patches[0] != '\0')
+     {
+       int i=0;
+       fprintf (stdout, _(" PATCHES:\n"));
+       while(*(included_patches[i]) != '\0')
+       {
+         fprintf (stdout, _("  %s\n"),included_patches[i]);
+         i++;
+       }
+     }
+
 /*
 #if SLRN_HAS_CHARACTER_MAP
    slrn_chmap_show_supported ();
--- src/mime.c	2007-01-26 21:38:23.000000000 +0100
+++ src/mime.c	2007-07-14 14:21:34.000000000 +0200
@@ -52,6 +52,7 @@
 int Slrn_Use_Meta_Mail = 1;
 int Slrn_Fold_Headers = 1;
 char *Slrn_MetaMail_Cmd;
+char *Slrn_Fallback_Input_Charset = NULL;
 
 #ifndef SLRNPULL_CODE
 #define CONTENT_TYPE_TEXT		0x01
@@ -179,7 +180,7 @@
 		    && (*b != '"'))
 	       b++;
 	     len = b - charset;
-	     
+
 	     a->mime.charset = slrn_safe_strnmalloc (charset, len);
 	     return 0;
 	  }
@@ -333,8 +334,22 @@
    s= *s_ptr;
 
    if (slrn_string_nonascii(s))
-	return -1;
-   
+     {
+       /* Only ascii is allowed in headers, if we find unencoded 8 bit chars
+        * convert them with the fallback charset.  */
+       if(Slrn_Fallback_Input_Charset != NULL)
+         {
+           char *c;
+
+           c= slrn_convert_substring(s, 0, 0, Slrn_Display_Charset, Slrn_Fallback_Input_Charset, 0);
+           if(c != NULL)
+             {
+               slrn_free(*s_ptr);
+               *s_ptr=c;
+             }
+         }
+       return -1;
+     }
    while (1)
      {
 	while ((NULL != (s = slrn_strchr (s, '=')))
@@ -533,6 +548,7 @@
    buf_pos = decode_base64(buf_dest, buf_src, buf_src+len);
    *buf_pos = '\0';
    
+#ifndef HAVE_ICONV_H
    if (a->mime.charset == NULL)
      {
 	buf_pos = buf_dest;
@@ -542,6 +558,7 @@
 	     buf_pos++;
 	  }
      }
+#endif
    
    l = body_start;
    body_start = body_start->prev;
@@ -803,14 +820,21 @@
 	a->mime.needs_metamail = 1;
 	return;
      }
-   
+  
    if ((a->mime.needs_metamail == 0) &&
 	     (a->mime.charset == NULL))
      {
-	a->mime.charset = slrn_safe_strmalloc("us-ascii");
-	return 0;
+       if(Slrn_Fallback_Input_Charset != NULL)
+         {
+           a->mime.charset = slrn_safe_strmalloc(Slrn_Fallback_Input_Charset);
+         }
+       else
+         {
+           a->mime.charset = slrn_safe_strmalloc("us-ascii");
+           return 0;
+         }
      }
- 
+
    if ((a->mime.needs_metamail == 0) &&
 	(slrn_case_strncmp((unsigned char *)"us-ascii",
 			   (unsigned char *)a->mime.charset,8) != 0) &&
