[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Classpathx-javamail] Re: UnsupportedEncodingException for unicode-1
From: |
Chris Burdess |
Subject: |
Re: [Classpathx-javamail] Re: UnsupportedEncodingException for unicode-1-1-utf-7 |
Date: |
Fri, 27 Nov 2009 16:26:16 +0000 |
Boris Folgmann wrote:
> Hi Chris,
> Chris Burdess schrieb/wrote:
>> 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?
>
> Cite from http://www.faqs.org/rfcs/rfc1642.html
>
> -------------------------------------------------------------------------
> Use of Character Set UTF-7 Within MIME
>
> Character set UTF-7 is safe for mail transmission and therefore may
> be used with any content transfer encoding in MIME (except where line
> length and line break restrictions are violated). Specifically, the 7
> bit encoding for bodies and the Q encoding for headers are both
> acceptable. The MIME character set identifier is UNICODE-1-1-UTF-7.
>
> Example. Here is a text portion of a MIME message containing the
> Unicode sequence "Hi Mom <WHITE SMILING FACE>!" (hexadecimal 0048,
> 0069, 0020, 004D, 006F, 004D, 0020, 263A, 0021).
>
> Content-Type: text/plain; charset=UNICODE-1-1-UTF-7
>
> Hi Mom +Jjo-!
> [...]
> -------------------------------------------------------------------------
Ah, my bad. UTF7 is only supported at the IMAP protocol level, not at the MIME
encoding level. If you're interested in developing this functionality, the
class gnu.inet.imap.UTF7imap may be helpful.
--
Chris Burdess