[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-javamail] UnsupportedEncodingException for unicode-1-1-u
From: |
Chris Burdess |
Subject: |
Re: [Classpathx-javamail] UnsupportedEncodingException for unicode-1-1-utf-7 |
Date: |
Fri, 27 Nov 2009 14:28:22 +0000 |
Boris Folgmann wrote:
> I get this exception when parsing an email:
>
> java.io.UnsupportedEncodingException: unicode-1-1-utf-7 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
> gnu.mail.handler.Text.getContent(Text.java:106) at
> javax.activationDataSourceDataContentHandler.getContent(DataHandler.java:803)
> at javax.activation.DataHandler.getContent(DataHandler.java:550) at
> javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:691) at
> gnu.mail.providers.imap.IMAPBodyPart.getContent(IMAPBodyPart.java:282)
>
> The encoding might be unsupported by JavaSE 5.0, but as it is a common
> encoding of emails, as you can read in RFC1642 (UTF-7 - A Mail-Safe
> Transformation Format of Unicode), I don't see why javamail shouldn't support
> it.
>
> Is it possible to implement a dirty work-around like forcing the BodyPart's
> encoding to US-ASCII before calling getContent()? I couldn't find a suitable
> method.
UTF7 is supported, however I have never heard of anything being identified as
"unicode-1-1-utf-7". Do you have a copy of the original message to hand?
--
Chris Burdess