Hi Stefano,

Thanks for the analysis. I extracted this use case to the following test:
https://github.com/lukas-vlcek/mime4j-test/blob/master/src/test/java/org/mime4j/test/BasicTest.java#L45

Now, the question is, why Mailman is able to render the output correctly if
the charset and used encoding in the body are not in sync. May be the
encoding of the message file has been changed when I copied the file from
the server to my local dev machine... or it is just coincidence? I do not
know... just thinking out loud...

Regards,
Lukas

On Fri, Dec 9, 2011 at 4:35 PM, Stefano Bagnara <[email protected]> wrote:

> 2011/12/7 Lukáš Vlček <[email protected]>:
> > Hi,
> >
> > The following is a eml source of a short mail:
> > https://gist.github.com/5a9b383c1dc048fac6d4
> >
> > The following is a link to public (Mailman) pipermail rendered
> > representation of the same mail:
> >
> http://lists.jboss.org/pipermail/jboss-cluster-dev/2008-April/000000.html
> >
> > Note how the sign in the footer of the email contains name "Zamarreño".
> >
> > When using mime4j I am getting "Zamarreño" instead (tested with both 0.6
> > and 0.7.1).
> >
> > Is mime4j able to parse this mail the same way as Mailman (2.1.9) can do
> it?
>
> mime4j is doing the right thing.
> The message declares the charset as ISO-8859-1 and then use an UTF8
> sequence.
> So if you really want to use ñ in an ISO-8859-1 message make sure you
> also use the right bytes (F1 is the right ISO-8859-1 instead "C3 B1"
> is the UTF8 sequence).
>
> The gist is displayed correctly on your browser because your browser
> uses utf8 to show it to you: force it to ISO-8859-1 and you will see
> the same sequence that mime4j gives you.
>
> Stefano
>
> > Regards,
> > Lukas
>

Reply via email to