Exception sun.io.MalformedInputException: Reversed byte-order mark

Hi,I came across exception sun.io.MalformedInputException when tried to render a MIME message. How to handle / resolve this exceptionAny help would be greatle appreciatedThanks,AmitMessage was edited by: amitsutar
[262 byte] By [amitsutara] at [2007-11-26 20:02:55]
# 1
This is probably a problem with incorrectly encoded data or a bad charset.The JavaMail FAQ has some hints for dealing with problems of this sort.
bshannona at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

I am still not able to resolve this problem.

I will elaborate a little bit.

I observed the problem only when I try to see message on IBM AIX with jdk 1.4.2

but same message opens properly on SUN Solaris and Linux machine.

The class which renders for all 2 platforms.

Any pointers?

Thanks,

Amit

amitsutara at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
You mean besides the FAQ?What exactly did you try, what happened, and what did you expect to happen?Without more details about your problem, it's hard to offer more than generalsuggestions.
bshannona at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Oh, and is there some reason you believe the data is not incorrectlyencoded? Or are you still trying to figure out what to do with the dataknowing that it's incorrectly encoded?Do you have a sample of the data that causes this problem?
bshannona at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
Message has 16bit attachments and same are shown inline as well.Its charset type is iso-10646-ucs-2. Is this something related to JDK version problem? Already filed as a bug to SUN bug database?Please reply.Thanks,Amit
amitsutara at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6

JDK 1.4 (at least) and newer seem to support that charset.

If you don't think they're supporting it correctly, I would need

more data, preferrably including a reproducible test case.

You can easily write a program that uses that charset and

writes data to a file, which you can compare with the data

you have, or send that file as a mail attachment and see if

JavaMail can read it.

bshannona at 2007-7-9 23:02:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...