By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,106 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

UnsupportedEncodingException with BIG-5 content type

P: n/a
When I make the following call with the mail has BIG-5 content type,

Part messagePart = message;
Object content = messagePart.getContent();

It throws the following exception

EXCEPTION THROWN JavaMailUtil.getMessage():Can't get the message :
java.io.UnsupportedEncodingException: BIG-5
at sun.io.Converters.getConverterClass(Converters.jav a:215)
at sun.io.Converters.newConverter(Converters.java:248 )
at sun.io.ByteToCharConverter.getConverter(ByteToChar Converter.java:64)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(Stream Decoder.java:223)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(Stream Decoder.java:209)
at sun.nio.cs.StreamDecoder.forInputStreamReader(Stre amDecoder.java:76)
at java.io.InputStreamReader.<init>(InputStreamReader .java:83)
at com.sun.mail.handlers.text_plain.getContent(text_p lain.java:65)
at javax.activation.DataSourceDataContentHandler.getC ontent(DataHandler.java:755)
at javax.activation.DataHandler.getContent(DataHandle r.java:511)
at javax.mail.internet.MimeMessage.getContent(MimeMes sage.java:1259)

If I change the content type to Big5, it will be okay? There are many
big 5 mail uses

Content-Type: text/html;
charset="BIG-5"

Why JavaMail will throws exception? Would anybody please tell me the
work around? Thanks!
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.