https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7253

--- Comment #2 from Mark Martinec <[email protected]> ---
> Tried to use Encode (latest version: 2.72)
[...]
> Although the Encode::MIME::Header is much more careful than
> our code, it is still wrong, resulting in an empty line
> inserted in the header!!!

Tried Encode 2.78 (the latest on CPAN), it is still broken
on multiple accounts:


- still inserts an empty line in a header on encoding:

$ perl -e 'use Encode; use utf8; printf("Subject: %s\n", encode("MIME-B",
  "report\n\tL_TEST_REPORT_ENCODING En-tête contient
caractères\n\tend-report"))'

<quote>
Subject: report

 =?UTF-8?B?CUxfVEVTVF9SRVBPUlRfRU5DT0RJTkcgRW4tdMOqdGUgY29udGllbnQgY2FyYWM=?=
 =?UTF-8?B?dMOocmVz?=
        end-report
</quote>


- produces a continuation line with no leading whitespace on encoding:

$ perl -e 'use Encode; use utf8; printf("Subject: %s\n", encode("MIME-Q",
  "report\n\tL_TEST_REPORT_ENCODING En-tête contient
caractères\n\tend-report"))'

<quote>
Subject: report
=?UTF-8?Q?=09L=5FTEST=5FREPORT=5FENCODI?=
 =?UTF-8?Q?NG=20En=2Dt=C3=AAte=20contient=20?= =?UTF-8?Q?caract=C3=A8res?=
        end-report
</quote>


- loses whitespace on folding when decodin
    https://rt.cpan.org/Public/Bug/Display.html?id=40027

$ perl -le 'use Encode; print decode("MIME-Header", "a: b\r\n c")'
a: bc

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to