N
none
I'm in the process of writing a mail client using javamail, but have
come across some text encoding problems. When a message has content of
the iso-8859-10, iso-8859-14 and iso-8859-16 types i get an
'UnsupportedEncodingException' when trying to retrieve the message
content. Below is an example stack trace.
java.io.UnsupportedEncodingException: iso-8859-10
at sun.io.Converters.getConverterClass(Converters.java:218)
at sun.io.Converters.newConverter(Converters.java:251)
at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:68)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:224)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:210)
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:77)
at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
at com.sun.mail.handlers.text_plain.getContent(text_plain.java:64)
at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:745)
at javax.activation.DataHandler.getContent(DataHandler.java:501)
at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1332)
at com.devisland.webmail.MailLayer.hasAttachment(MailLayer.java:145)
What the best way to add support for these encodings? i'm not familar
with the sun.io.converters package. Any help would be great.
Thanks in advance,
Tim
come across some text encoding problems. When a message has content of
the iso-8859-10, iso-8859-14 and iso-8859-16 types i get an
'UnsupportedEncodingException' when trying to retrieve the message
content. Below is an example stack trace.
java.io.UnsupportedEncodingException: iso-8859-10
at sun.io.Converters.getConverterClass(Converters.java:218)
at sun.io.Converters.newConverter(Converters.java:251)
at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:68)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:224)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:210)
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:77)
at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
at com.sun.mail.handlers.text_plain.getContent(text_plain.java:64)
at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:745)
at javax.activation.DataHandler.getContent(DataHandler.java:501)
at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1332)
at com.devisland.webmail.MailLayer.hasAttachment(MailLayer.java:145)
What the best way to add support for these encodings? i'm not familar
with the sun.io.converters package. Any help would be great.
Thanks in advance,
Tim