one error!! about encodeWord(), help me ...!!!

name="zhejiang hangzhou sss., LDT";message.setFrom( MimeUtility.encodeWord(name,"GBK","B"));error:Illegal whitespace in addresswhy?
[159 byte] By [wangkjuna] at [2007-10-3 3:26:28]
# 1
Um, what exactly are you trying to accomplish?The name string isn't a word, it's multiple words.You should almost never need to use encodeWord directly.The name string, encoded or not, is not a valid email address.
bshannona at 2007-7-14 21:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
My English is poor, maybe not expressed clearly, please understanding I found that the name contains the symbols ( ",") on the wrongwhether have another ways to deal with this symbol
wangkjuna at 2007-7-14 21:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Maybe I'm not understanding you, but if what you want is an email

address whose "personal name" field contains a comma, create an

InternetAddress object like this:

InternetAddress ia = new InternetAddress("joe@example.com", "Joe, Jr.");

Then use it like this:

msg.setFrom(ia);

bshannona at 2007-7-14 21:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
thanks!!
wangkjuna at 2007-7-14 21:19:39 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...