[BUG+FIX] attaching text files with 8-bit characters broken in 2.0.11
- From: Albrecht Dreß <albrecht dress arcor de>
- To: Balsa-Liste <balsa-list gnome org>
- Subject: [BUG+FIX] attaching text files with 8-bit characters broken in 2.0.11
- Date: Thu, 12 Jun 2003 19:37:39 +0200
When a text file containing 8-bit characters is attached in balsa 2.0.11,
the content type of the atttachment will be text/something with the
charset parameter set to "UTF-8". Unfortunately, the character conversion
applied is somehow broken, resulting in an attachment which can not be
converted back to a e.g. iso8859 charset (to reproduce this, create a
small text file in an editor containing some 8-bit chars, send it to
yourself, save the result and try using iconv to convert it back).
IMHO, it is not safely possible to make a conversion to UTF-8 anyway, as
balsa/libmutt has no idea about the original charset of the attachment.
Using the patch below, an 8-bit attachment will always get "UNKNOWN-
8BIT" (which is an IANA registered type, see RFC 1428 and
http://www.iana.org/assignments/character-sets) as charset parameter.
Comments?
Cheers, Albrecht.
P.S.: I sent a patch for displaying embedded headers ~a week ago to
bugzilla and to the list, but did not get *any* response. It would be
really great if someone could have a look at it...
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)
Phone (+49) 228 6199571 - mailto:albrecht.dress@arcor.de
_________________________________________________________________________
--- balsa-2.0.11/libmutt/sendlib.c Tue Mar 18 20:41:36 2003
+++ balsa-2.0.11-patched/libmutt/sendlib.c Thu Jun 12 14:48:06 2003
@@ -974,9 +974,15 @@
safe_fclose (&fp);
if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset))
+#ifdef LIBMUTT
+ /* BALSA: don't use Charset (which is UTF-8) for attachments */
+ mutt_set_parameter ("charset", (!info->hibin ? "us-ascii" : "unknown-8bit"),
+ &b->parameter);
+#else
mutt_set_parameter ("charset", (!info->hibin ? "us-ascii" :
Charset && !mutt_is_us_ascii (Charset) ? Charset : "unknown-8bit"),
&b->parameter);
+#endif
return info;
}
PGP signature
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]