• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

[javamail] Error with encoding

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic