I would have a look to rfc2047, that is not in the James cvs, but that you can find
using google. For example I found http://www.faqs.org/rfcs/rfc2047.html.
Reading there, my understanding is that a mail client should always encode non ascii
text headers (like a subject) into an encoded word:
encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
like Outlook Express does in your examples:
Subject: =?gb2312?B?1tDOxA==?=
where gb2312 is the charset, and the message travels in such format. The recipient's
mail client may/should at this point decode using the appropriate graphical
representation.
Here is a snippet from the introduction of the rfc2047 specification:
<snippet>
RFC 2045 describes a mechanism for denoting textual body parts which
are coded in various character sets, as well as methods for encoding
such body parts as sequences of printable US-ASCII characters. This
memo describes similar techniques to allow the encoding of non-ASCII
text in various portions of a RFC 822 [2] message header, in a manner
which is unlikely to confuse existing message handling software.
Like the encoding techniques described in RFC 2045, the techniques
outlined here were designed to allow the use of non-ASCII characters
in message headers in a way which is unlikely to be disturbed by the
quirks of existing Internet mail handling programs. In particular,
some mail relaying programs are known to (a) delete some message
header fields while retaining others, (b) rearrange the order of
addresses in To or Cc fields, (c) rearrange the (vertical) order of
header fields, and/or (d) "wrap" message headers at different places
than those in the original message. In addition, some mail reading
programs are known to have difficulty correctly parsing message
headers which, while legal according to RFC 822, make use of
backslash-quoting to "hide" special characters such as "<", ",", or
":", or which exploit other infrequently-used features of that
specification.
While it is unfortunate that these programs do not correctly
interpret RFC 822 headers, to "break" these programs would cause
severe operational problems for the Internet mail system. The
extensions described in this memo therefore do not rely on little-
used features of RFC 822.
Instead, certain sequences of "ordinary" printable ASCII characters
(known as "encoded-words") are reserved for use as encoded data. The
syntax of encoded-words is such that they are unlikely to
"accidentally" appear as normal text in message headers.
Furthermore, the characters used in encoded-words are restricted to
those which do not have special meanings in the context in which the
encoded-word appears.
Generally, an "encoded-word" is a sequence of printable ASCII
characters that begins with "=?", ends with "?=", and has two "?"s in
between. It specifies a character set and an encoding method, and
also includes the original text encoded as graphic ASCII characters,
according to the rules for that encoding method.
A mail composer that implements this specification will provide a
means of inputting non-ASCII text in header fields, but will
translate these fields (or appropriate portions of these fields) into
encoded-words before inserting them into the message header.
A mail reader that implements this specification will recognize
encoded-words when they appear in certain portions of the message
header. Instead of displaying the encoded-word "as is", it will
reverse the encoding and display the original text in the designated
character set.
</snippet>
Notes seems to ignore this; sendmail seems to accept anything, so they work together.
Now, does the sentence "A mail composer that implements this specification..." mean
that a mail composer can not implement it?
Secondly, should James do something to accept a "non compliant message", *if* it is
not compliant?
Third, is it something that arises at the level of James, or is at the level of
java.mail?
I don't know, and I "request for comments" :-) from others in this list.
Vincenzo
> -----Original Message-----
> From: Jeff Cai [mailto:[EMAIL PROTECTED]
> Sent: martedì 24 giugno 2003 8.24
> To: James Users List
> Subject: RE: Can't display chinese title and sender name
>
>
> Which RFC I can study?
>
> Thanks
>
> --- "Noel J. Bergman" <[EMAIL PROTECTED]> :> > But
> seems sendmail can handle correctly.
> >
> > Actually not. This:
> >
> > > sendmail+Notes(works)
> > > Subject: 中文
> >
> > is an RFC violation.
> >
> > --- Noel
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
> _________________________________________________________
> Do You Yahoo!?
> 网恋的诠释:真情还是放纵?
> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/netlove
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]