Примеры
Recover a folded email subject with two declared character sets
Decode complete encoded words and fold whitespace, rather than Base64-decoding an entire mail header blindly.
Ввод
1b2b46cf445aa5c13be21ab2.bin
105 bytes
СкачатьExpected answer
If you can read this you understand the example.If you can read this you understand the example.
Encoded adjacent comments whitespace
Ввод
(=?ISO-8859-1?Q?a?= b)Expected answer
(a b)(a b)
Encoded adjacent CRLF whitespace ignored
Ввод
5952d834acca3b0f61d128ab.bin
41 bytes
СкачатьExpected answer
(ab)(ab)
Encoded adjacent double whitespace ignored
Ввод
(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)Expected answer
(ab)(ab)
Encoded adjacent single whitespace ignored
Ввод
(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)Expected answer
(ab)(ab)
Encoded comments
Ввод
(=?ISO-8859-1?Q?a?=)Expected answer
(a)(a)
ISO Decoding
Ввод
From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>
To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>
CC: =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>
Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=Expected answer
From: Keith Moore <moore@cs.utk.edu>
To: Keld Jørn Simonsen <keld@dkuug.dk>
CC: André Pirard <PIRARD@vm1.ulg.ac.be>
Subject: If you can read this you understand the example.From: Keith Moore <moore@cs.utk.edu> To: Keld Jørn Simonsen <keld@dkuug.dk> CC: André Pirard <PIRARD@vm1.ulg.ac.be> Subject: If you can read this you understand the example.
UTF-8 Base64 ASCII-only
Ввод
Subject: =?UTF-8?B?aGVsbG8=?=Expected answer
Subject: helloSubject: hello
UTF-8 Base64 multibyte CJK
Ввод
Subject: =?UTF-8?B?5pel5pys6Kqe?=Expected answer
Subject: 日本語Subject: 日本語
UTF-8 Base64 non-ASCII
Ввод
Subject: =?UTF-8?B?Y2Fmw6k=?=Expected answer
Subject: caféSubject: café