摘要:
用javamail以来,一直被中文乱码困扰,虽然90%的邮件都正常,但是剩下10%的乱码确实让人心里疙疙瘩瘩。通过代码subject = MimeUtility.decodeText(mimeMessage.getSubject());subject = MimeUtility.decodeText(subject);获取的subject大部分都是正确的,但偶尔出现乱码,网上给出解决办法,subject = new String(subject.getBytes("ISO8859_1"), "GBK"),的确解决了乱码问题,但是以前正确的就变成了乱码。能 阅读全文
posted @ 2011-04-07 15:44 刘政道 阅读(5113) 评论(0) 推荐(1) 编辑