Hello,

I have a sudden doubt about character set encoding regarding envelope and bodystructure... presently I only pass US-ASCII characters... if something is not ASCII, I encode it in a mail-safe form as per RFC 2047.

For example, the following subject "_çæ.txt _UntitleÌd.txt" is encoded as "=?UTF-8?Q?=5F=E7=B5=8C=E6=B8=88.txt_=5FUntitle=CC=88d.txt?="

The envelope would look like this:

* 9 FETCH (envelope ("Thu, 19 Aug 2004 16:19:46 +0200 (CEST)" "=?UTF-8?Q?=5F=E7=B5=8C=E6=B8=88.txt_=5FUntitle=CC=88d.txt?=" (("petite_abeille" NIL "petite_abeille" "mac.com")) (("petite_abeille" NIL "petite_abeille" "mac.com")) ((NIL NIL "public" "honey.zappata.net")) ((NIL NIL "public" "honey.zappata.net")) NIL NIL NIL "<[EMAIL PROTECTED]>"))

And the bodystructure as follow:

* 9 FETCH (bodystructure (("text" "plain" ("format" "flowed" "charset" "UTF-8") NIL NIL "quoted-printable" 47 0)("application" "octet-stream" ("name" "=?UTF-8?Q?=5FUntitl=C3=ABd.txt?=" "x-unix-mode" "0644") NIL NIL "7bit" 16)("application" "octet-stream" ("name" "=?UTF-8?Q?=5F=1B$B7P:Q=1B(B.txt?=" "x-unix-mode" "0644") NIL NIL "7bit" 16)("text" "plain" ("format" "flowed" "charset" "US-ASCII") NIL NIL "7bit" 2 0)("image" "jpeg" ("x-mac-creator" "70727677" "name" "AboutInfo.jpg" "x-unix-mode" "0644" "x-mac-type" "4A504547") NIL NIL "base64" 12624) "mixed" ("boundary" "Apple-Mail-12-801353491")))

But this doesn't seem to work reliably in all clients... for example, Mulberry get very puzzled by Chinese characters in either envelope or bodystructure... Apple's Mail got it mostly right, but sometime mangles attachment names... even Mozilla Thunderbird doesn't display text in a consistent fashion...

Am I doing something obviously wrong regarding character set encoding? Should I stick to ASCII as presently? Alternatively, is there a way to specify a character set (e.g. UTF-8)? What gives?

TIA.

Cheers,

PA.

--
-----------------------------------------------------------------
For information about this mailing list, and its archives, see:
http://www.washington.edu/imap/imap-list.html
-----------------------------------------------------------------



Reply via email to