Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6954:aee731c09668 HEAD
If we encounter an unknown charset, get the ASCII (or UTF-8 actually)
characters instead of ignoring it completely.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 08 Dec 2007 15:59:48 +0200 |
parents | edd296d164db |
children | 07f151520c84 |
files | src/lib-mail/message-header-decode.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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; }