You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by mickey <mi...@so-net.net.tw> on 2003/03/17 17:16:31 UTC

Fw: Chinese(double-byte) character problem with headers



 Sorry for my English in advance :(
 I've been struggled with this problem for days:

   We know that smtp does not allow message to be transferd other than 7 bit
 , so our mail client has to encode our message with base64 or other
algorithm
 before sending, here comes the problem, some mail client does not encode
these
 message (may be using web-mail, who knows), and I get these un-encoded
message
 all in a mess (something like '????').
   However, this only occured in headers, so I guess this must be a mailet
 issue, by the experience from JavaMail, I know that I should use
getHeader() rather
 than getSubject(), 'cause getSubject() assume my headers are encoded, I've
tried
 to modify org.apache.james.core.MimeMessageWrapper, but it didn't work, any
clue?



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: Chinese(double-byte) character problem with headers

Posted by "Noel J. Bergman" <no...@devtech.com>.
Mickey,

Which repository type are you using?  And could you send me a sample message
that has this problem, as an attachment?  I'd like to see one.

	--- Noel

-----Original Message-----
From: mickey [mailto:mickeywong@so-net.net.tw]
Sent: Tuesday, March 18, 2003 9:26
To: James Users List
Subject: Re: Chinese(double-byte) character problem with headers

I've tried a few minutes ago, too bad, it fails!

when I call

MimeMessage.getHeader("subject") in void service(Mail mail)

the header in message is already a mess (i.e. "???????" ), I cannot do
anything about it, so I think the problem is located in transport layer,
any idea?

> If you are getting incorrectly encoded messages, and you know the proper
> character set, why not write a mailet to take unencoded messages and
> encode them?  However you don't want to base64 encode headers.  Header
> encoding follows RFC 2047, which means that headers are in US-ASCII
> unless encoded as per that RFC.


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Chinese(double-byte) character problem with headers

Posted by mickey <mi...@so-net.net.tw>.
I've tried a few minutes ago, too bad, it fails!
when I call

MimeMessage.getHeader("subject") in void service(Mail mail)

the header in message is already a mess (i.e. "???????" ), I cannot do
anything about it,
so I think the problem is located in transport layer, any idea?

> If you are getting incorrectly encoded messages, and you know the proper
> character set, why not write a mailet to take unencoded messages and
encode
> them?  However you don't want to base64 encode headers.  Header encoding
> follows RFC 2047, which means that headers are in US-ASCII unless encoded
as
> per that RFC.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Chinese(double-byte) character problem with headers

Posted by mickey <mi...@so-net.net.tw>.
  Thanks for your reply, I think I got the point,
  Maybe I should try to figure mailets out.

> > our mail client has to encode our message with base64
> > or other algorithm before sending, here comes the
> > problem, some mail client does not encode
>
> If you are saying that you have mail clients that are not properly
encoding
> content, what are they doing with it?  The RFCs all state that unless
> properly encoded, all message content is interpreted in US-ASCII.
>
> If you are getting incorrectly encoded messages, and you know the proper
> character set, why not write a mailet to take unencoded messages and
encode
> them?  However you don't want to base64 encode headers.  Header encoding
> follows RFC 2047, which means that headers are in US-ASCII unless encoded
as
> per that RFC.
>
> Perhaps I am not understanding your questions.
>
> --- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: Chinese(double-byte) character problem with headers

Posted by "Noel J. Bergman" <no...@devtech.com>.
> our mail client has to encode our message with base64
> or other algorithm before sending, here comes the
> problem, some mail client does not encode

If you are saying that you have mail clients that are not properly encoding
content, what are they doing with it?  The RFCs all state that unless
properly encoded, all message content is interpreted in US-ASCII.

If you are getting incorrectly encoded messages, and you know the proper
character set, why not write a mailet to take unencoded messages and encode
them?  However you don't want to base64 encode headers.  Header encoding
follows RFC 2047, which means that headers are in US-ASCII unless encoded as
per that RFC.

Perhaps I am not understanding your questions.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org