"abc@example.com, "
"Bar Baz <bar@example.org>, "
"foo@domain "
- "1234567890123456789012345678ä,"
- "12345678901234567890123456789ä,"
- "123456789012345678901234567890ä,"
+ "1234567890123456789012345678\xC3\xA4,"
+ "12345678901234567890123456789\xC3\xA4,"
+ "123456789012345678901234567890\xC3\xA4,"
"and longlonglongabcdefghijklmnopqrstuvwxyz more.\n\n "
"(\"Hello world\")3.14 3,14 last",
"' ' '' ''' 'quoted text' 'word' 'hlo words' you're bad'''word '''pre post'''",
- "'1234567890123456789012345678ä,"
- "123456789012345678901234567x'ä,"
+ "'1234567890123456789012345678\xC3\xA4,"
+ "123456789012345678901234567x'\xC3\xA4,"
"1234567890123456789012345678x're,"
"1234567890123456789012345678x',"
"1234567890123456789012345678x'',"
"there", "was", "text", "galor\xC3\xA9",
"abc", "example", "com", "Bar", "Baz",
"bar", "example", "org", "foo", "domain",
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"12345678901234567890123456789",
"123456789012345678901234567890",
"and", "longlonglongabcdefghijklmnopqr",
"quoted", "text", "word", "hlo", "words", "you're", "bad",
"word", "pre", "post", NULL,
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"123456789012345678901234567x'",
"1234567890123456789012345678x'",
"1234567890123456789012345678x",
"there", "was", "text", "galor\xC3\xA9",
"abc", "example", "com", "Bar", "Baz",
"bar", "example", "org", "foo", "domain",
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"12345678901234567890123456789",
"123456789012345678901234567890",
"and", "longlonglongabcdefghijklmnopqr",
"quoted", "text", "word", "hlo", "words", "you're", "bad",
"word", "pre", "post", NULL,
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"123456789012345678901234567x'",
"1234567890123456789012345678x'",
"1234567890123456789012345678x",
"there", "was", "text", "galor\xC3\xA9",
"abc", "example", "com", "Bar", "Baz",
"bar", "example", "org", "foo", "domain",
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"12345678901234567890123456789",
"123456789012345678901234567890",
"and", "longlonglongabcdefghijklmnopqr",
"quoted", "text", "word", "hlo", "words", "you're", "bad",
"word", "pre", "post", NULL,
- "1234567890123456789012345678ä",
+ "1234567890123456789012345678\xC3\xA4",
"123456789012345678901234567x'",
"1234567890123456789012345678x'",
"1234567890123456789012345678x",
static void test_message_header_decode(void)
{
static const char *data[] = {
- " \t=?utf-8?q?=c3=a4?= =?utf-8?q?=c3=a4?= b \t\r\n ", "ää b \t\r\n ",
- "a =?utf-8?q?=c3=a4?= b", "a ä b",
- "a =?utf-8?q?=c3=a4?= b", "a ä b",
- "a =?utf-8?q?=c3=a4?=\t\t\r\n =?utf-8?q?=c3=a4?= b", "a ää b",
- "a =?utf-8?q?=c3=a4?= x =?utf-8?q?=c3=a4?= b", "a ä x ä b",
- "a =?utf-8?b?w6TDpCDDpA==?= b", "a ää ä b",
- "=?utf-8?b?w6Qgw6Q=?=", "ä ä",
+ " \t=?utf-8?q?=c3=a4?= =?utf-8?q?=c3=a4?= b \t\r\n ", "\xC3\xA4\xC3\xA4 b \t\r\n ",
+ "a =?utf-8?q?=c3=a4?= b", "a \xC3\xA4 b",
+ "a =?utf-8?q?=c3=a4?= b", "a \xC3\xA4 b",
+ "a =?utf-8?q?=c3=a4?=\t\t\r\n =?utf-8?q?=c3=a4?= b", "a \xC3\xA4\xC3\xA4 b",
+ "a =?utf-8?q?=c3=a4?= x =?utf-8?q?=c3=a4?= b", "a \xC3\xA4 x \xC3\xA4 b",
+ "a =?utf-8?b?w6TDpCDDpA==?= b", "a \xC3\xA4\xC3\xA4 \xC3\xA4 b",
+ "=?utf-8?b?w6Qgw6Q=?=", "\xC3\xA4 \xC3\xA4",
};
string_t *dest;
unsigned int i;
str_append_c(input, 'a');
for (i = 0; i < 40; i++)
- str_append(input, "ä");
+ str_append(input, "\xC3\xA4");
for (i = 0; i < 80; i++) {
for (skip = 0; skip < 2; skip++) {
str_truncate(str, 0);
str_append_c(input, 'a');
for (i = 0; i < 40; i++)
- str_append(input, "ä");
+ str_append(input, "\xC3\xA4");
for (i = 0; i < 80; i++) {
for (skip = 0; skip < 2; skip++) {
str_truncate(str, 0);
{
const char *data[] = {
"a b", "a b",
- "a bcäde f", "a =?utf-8?q?bc=C3=A4de?= f",
- "a ää ä b", "a =?utf-8?b?w6TDpCDDpA==?= b",
- "ä a ä", "=?utf-8?q?=C3=A4_a_=C3=A4?=",
- "ää a ä", "=?utf-8?b?w6TDpCBhIMOk?=",
+ "a bc\xC3\xA4""de f", "a =?utf-8?q?bc=C3=A4de?= f",
+ "a \xC3\xA4\xC3\xA4 \xC3\xA4 b", "a =?utf-8?b?w6TDpCDDpA==?= b",
+ "\xC3\xA4 a \xC3\xA4", "=?utf-8?q?=C3=A4_a_=C3=A4?=",
+ "\xC3\xA4\xC3\xA4 a \xC3\xA4", "=?utf-8?b?w6TDpCBhIMOk?=",
"=", "=",
"?", "?",
"a=?", "a=?",