aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Processing e-mail htm attachment but displayed with spaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Processing e-mail htm attachment but displayed with spaces" Watch "Processing e-mail htm attachment but displayed with spaces" New topic
Author

Processing e-mail htm attachment but displayed with spaces

T. Huizt
Greenhorn

Joined: Jul 17, 2013
Posts: 2
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.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

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..



Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Also: Available Doesn't Do What You Think It Does also applies for ready(). Rewrite your loop:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
T. Huizt
Greenhorn

Joined: Jul 17, 2013
Posts: 2
Hello Richard,

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

Also Rob, thanks for your remark.

T.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Processing e-mail htm attachment but displayed with spaces