使用例
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é