/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "base64.h"
#include "buffer.h"
#include "unichar.h"
#include "charset-utf8.h"
#include "quoted-printable.h"
#include "message-header-decode.h"
static size_t
{
unsigned int num = 0;
/* data should contain "charset?encoding?text?=" */
for (i = 0; i < size; i++) {
if (data[i] == '?') {
break;
}
}
/* invalid block */
return 0;
}
case 'q':
case 'Q':
decodebuf) < 0) {
/* we skipped over some invalid data */
}
break;
case 'b':
case 'B':
/* contains invalid data. show what we got so far. */
}
break;
default:
/* unknown encoding */
return 0;
}
}
{
size_t i;
for (i = 0; i < size; i++) {
return FALSE;
}
return TRUE;
}
void *context)
{
/* =?charset?Q|B?text?= */
start_pos = 0;
pos++;
continue;
}
/* encoded string beginning */
/* send the unencoded data so far */
break;
}
}
} else {
}
pos += 2;
decodebuf, &charsetlen);
if (ret == 0) {
continue;
}
/* decodebuf contains <charset> NUL <text> */
break;
}
}
}
}
}
struct decode_utf8_context {
};
static bool
{
struct charset_translation *t;
/* ASCII / UTF-8 */
} else {
}
return TRUE;
}
/* data probably still contains some valid ASCII characters.
append them. */
return TRUE;
}
/* ignore any errors */
charset_to_utf8_end(&t);
return TRUE;
}
{
}