james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiederkehr <markus.wiederk...@gmail.com>
Subject Re: DecoderUtil question.
Date Sun, 16 Aug 2009 20:46:28 GMT
On Sun, Aug 16, 2009 at 3:00 PM, Wim Jongman<wim.jongman@gmail.com> wrote:
> Hi,
> I came across this line in a message:
>
> utf  "=?utf-8?Q?Re:=20How=20to=20place=20a=20view=20at=20the=20bottom?=
> =?utf-8?Q?=20with=20a=20100%=20width?="
> System.out.println(DecoderUtil.decodeEncodedWords(utf));
>
> gives:
>
> Re: How to place a view at the bottom =?utf-8?Q?=20with=20a=20100%=20width?=
>
> but should give:
>
> Re: How to place a view at the bottom with a 100% width

FWIW JavaMail's MimeUtility.decodeText() gives the correct result.

I think the strategy should be to parse charset and encoding, then
decode the encoded-text as far as possible (using either B or Q
encoding), then expect the trailing ?=.

Markus

>
> Is there something i have missed?
>
> Best regards,
>
> Wim

Mime
View raw message