Re: Re: UnsupportedEncodingException for unicode-1-1-utf-7
Chris Burdess <[email protected]> Fri, 27 Nov 2009 16:26:16 +0000
| Newsgroups | gmane.comp.java.classpath.extensions.javamail |
|---|---|
| Message-ID | <[email protected]> |
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? >=20 > Cite from http://www.faqs.org/rfcs/rfc1642.html >=20 > = ------------------------------------------------------------------------- > Use of Character Set UTF-7 Within MIME >=20 > 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. >=20 > 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). >=20 > Content-Type: text/plain; charset=3DUNICODE-1-1-UTF-7 >=20 > 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. --=20 Chris Burdess