On 11/5/06, robert burrell donkin <[EMAIL PROTECTED]> wrote:

canonicalisation involves converting line endings to a standard
format. what worries me a little is that javamail uses inputstream's
and outputstream's which means encoding may be an issue. it would be
ok to use byte-wise comparisons for latin encodings but this may well
break when faced with multibyte encoding schemes (for example
shift-JIS).

Robert,
How's tricks?
just my 2c here, I've always fought shy of this problem(!)

Welcome to our world. One of the problems we face is that Java (in
general) handles encodings and charsets and all that unecessary
confusion "under the hood", byte[]->String conversions aren't the most
convenient things to have to deal with. But because MIME has a pretty
complete answer to sending non-ascii encodings and character sets
using only ascii it is probaly easier to keep it all in perspective
using byte[]'s

What might make sense is to assume that JavaMail follows the rules,
and check the MIME RFC for details of how to handle encodings. Knowing
email like I do I would expect that the rule is that whatever would
have been used without announcement in the "olden days" is assumed to
be in use where no announcement is present. i.e. plain old ASCII. So
if you read the headers and find no encoding you could bet that your
assumptions for Latin encodings will apply.

d.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to