• Post Reply Bookmark Topic Watch Topic
  • New Topic

[javamail] Error with encoding  RSS feed

 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

I'm getting the exception bellow when trying to run "Part.getContent()", just for some cases. See the (legacy) code:



INFO | jvm 1 | 2005/06/29 07:03:48 | java.io.IOException: Unknown encoding:
us-ascii
INFO | jvm 1 | 2005/06/29 07:03:48 | at
javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:70)
INFO | jvm 1 | 2005/06/29 07:03:48 | at
com.sun.mail.handlers.text_plain.getContent(text_plain.java:64)
INFO | jvm 1 | 2005/06/29 07:03:48 | at
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
INFO | jvm 1 | 2005/06/29 07:03:48 | at
javax.activation.DataHandler.getContent(DataHandler.java:511)
INFO | jvm 1 | 2005/06/29 07:03:48 | at
javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:564)

How am I supposed to handle "us-ascii"?

Thanks in advance!
 
Tiago Fernandez
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The encoding is a particular Javamail RFE (request for enhancement), so getting the content of a UTF-7 encoded message for example, leads to
UnsuportedEncodingException.

It's unbeliavable, but the bug is being processed since JAN-11-2000:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4304013
[ July 22, 2005: Message edited by: Tiago Fernandez ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!