Re: [patch] treatment of wrongly encoded 8-bit messages
- From: Albrecht Dreß <albrecht dress arcor de>
- To: Balsa-Liste <balsa-list gnome org>
- Cc: Pawel Salek <pawsa theochem kth se>
- Subject: Re: [patch] treatment of wrongly encoded 8-bit messages
- Date: Sun, 16 Feb 2003 21:50:23 +0100
Am 16.02.03 19:39 schrieb(en) Albrecht Dreß:
> deeper into this... My first guess is that libmutt sees some of the mime
> headers, assumes a charset (us-ascii?), and replaces the 8-bit chars by
> "?". The result is that libbalsa_utf8_sanitize (and my patch) will never
> see the original chars. Stay tuned...
O.k., I got it... libmutt assumes us-ascii for all mime messages without
the charset parameter (see parse.c). I think we should just omit the
conversion from us-ascii to utf8, which does not do any harm if the
messages are encoded correctly, but enables the user-defined fallback
conversion. The file to change (apply it after my first patch) is again
libmutt/handler.c:
~~~~~snip here~~~~~
--- handler.c.orig Sun Feb 16 21:48:20 2003
+++ handler.c Sun Feb 16 21:38:55 2003
@@ -1716,7 +1716,14 @@
if (istext && s->flags & M_CHARCONV)
{
char *charset = mutt_get_parameter ("charset", b->parameter);
+#ifdef LIBMUTT
+ /* balsa 2: don't convert us-ascii. It should not do any harm with
+ correctly encoded messages, but enables fallback converion to a
+ user-defined codeset for broken messages. */
+ if (charset && Charset && strcmp(charset, "us-ascii"))
+#else
if (charset && Charset)
+#endif
cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM);
}
~~~~~snip here~~~~~
Cheers, Albrecht.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Albrecht Dreß - Johanna-Kirchner-Straße 13 - D-53123 Bonn (Germany)
Phone (+49) 228 6199571 - mailto:albrecht.dress@arcor.de
_________________________________________________________________________
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]