• 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
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Processing e-mail htm attachment but displayed with spaces

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

Trying to autoprocess e-mail attachement but the text is shown seperated with spaces.
Suspecting something with codepages but as I'm totally unfamiliar with this have no idea how to solve it.
Big friend Google didn't help much here.
Anyone knows how to solve this issue ?

any help greatly appreciated.






Wanted to display a sample result of the code above the forum rules don't allow that.
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The chances are that the encoding is one of the two byte per characters encodings such as "utf16" so to test the theory you could try


The actual character encoding is normally available in the charset field of the content type..



 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also: Available Doesn't Do What You Think It Does also applies for ready(). Rewrite your loop:
 
T. Huizt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Richard,

Thanks very much for your solution as it solved my issue.

Also Rob, thanks for your remark.

T.
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

T. Huizt wrote:
Thanks very much for your solution as it solved my issue.



If you just used "utf16" and have not extract the actual character encoding from the content type then you have just created a bomb that will go off sometime in the future.
reply
    Bookmark Topic Watch Topic
  • New Topic