dovecot: If we encounter an unknown charset, get the ASCII (or U...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Dec 8 15:59:51 EET 2007
details: http://hg.dovecot.org/dovecot/rev/aee731c09668
changeset: 6954:aee731c09668
user: Timo Sirainen <tss at iki.fi>
date: Sat Dec 08 15:59:48 2007 +0200
description:
If we encounter an unknown charset, get the ASCII (or UTF-8 actually)
characters instead of ignoring it completely.
diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
src/lib-mail/message-header-decode.c | 5 ++++-
diffs (15 lines):
diff -r edd296d164db -r aee731c09668 src/lib-mail/message-header-decode.c
--- a/src/lib-mail/message-header-decode.c Sat Dec 08 15:55:09 2007 +0200
+++ b/src/lib-mail/message-header-decode.c Sat Dec 08 15:59:48 2007 +0200
@@ -154,7 +154,10 @@ decode_utf8_callback(const unsigned char
flags = ctx->dtcase ? CHARSET_FLAG_DECOMP_TITLECASE : 0;
if (charset_to_utf8_begin(charset, flags, &t) < 0) {
- /* let's just ignore this part */
+ /* data probably still contains some valid ASCII characters.
+ append them. */
+ if (uni_utf8_get_valid_data(data, size, ctx->dest))
+ buffer_append(ctx->dest, data, size);
return TRUE;
}
More information about the dovecot-cvs
mailing list