EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ASCII mail attachment is saved as unicode?

Posted: 02/11/2013 09:40:52
by Peter Palotas (Basic support level)
Joined: 11/01/2012
Posts: 49

I sent a mail from Outlook containing an ASCII file attachment. When using TElMessage.ParseMessage on this message (after retrieving it from POP3) and then TElMessage.SaveDatatToFile on the body-part containing the attachment the file saved is in Unicode. (In my case 44 bytes large instead of the original 22 bytes). If I save the same attachment from outlook the file is the correct 22 bytes. Any ideas on why this is?
Posted: 02/11/2013 09:42:20
by Eugene Mayevski (Team)

Why you think that 44 bytes is "incorrect"? Did you look inside the saved file?

Sincerely yours
Eugene Mayevski
Posted: 02/11/2013 09:45:19
by Peter Palotas (Basic support level)
Joined: 11/01/2012
Posts: 49

Because the original file is 22 bytes in ASCII encoding. The resulting file is 44 bytes and in Unicode encoding. So the files are not equal, the encoding has changed.
Posted: 02/11/2013 09:47:40
by Eugene Mayevski (Team)

Most likely the attachment was loaded as text and parsed. This could happen due to malform attachment headers (eg. content-disposition: inline).

Please post some sample code that shows how you load the message and the message itself to HelpDesk for investigation.

Sincerely yours
Eugene Mayevski
Posted: 02/12/2013 06:36:30
by Alexander Ionov (Team)

The issue if fixed in HelpDesk.

Best regards,
Alexander Ionov



Topic viewed 662 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!