Index: article.c =================================================================== RCS file: /cvs/gnome/pan/pan/base/article.c,v retrieving revision 1.52 diff -u -r1.52 article.c --- article.c 14 Jun 2002 06:42:52 -0000 1.52 +++ article.c 17 Jun 2002 05:22:43 -0000 @@ -1096,18 +1096,7 @@ /* see if we've got the body hidden in a header... */ if (retval==NULL) - { - const char * body = article_get_extra_header (a, PAN_BODY); - if (body != NULL) - { - const char * charset = article_get_extra_header (a, PAN_CHARSET); - - if (is_nonempty_string (charset)) - retval = g_convert (body, -1, charset, "UTF-8", NULL, NULL, NULL); - else - retval = g_strdup (body); - } - } + retval = g_strdup (article_get_extra_header (a, PAN_BODY)); /* see if we've got it in acache... */ if (retval==NULL) @@ -1122,6 +1111,17 @@ g_mime_object_unref (GMIME_OBJECT(m)); g_free (s); } + } + + if (retval != NULL) + { + const char * charset; + + charset = article_get_extra_header (a, PAN_CHARSET); + if (!is_nonempty_string (charset)) + charset = group_get_default_charset (a->group); + + replace_gstr (&retval, g_convert (retval, -1, "UTF-8", charset, NULL, NULL, NULL)); } return retval;