EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ASCII mail attachment is saved as unicode?

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#23398
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?
#23399
Posted: 02/11/2013 09:42:20
by Eugene Mayevski (EldoS Corp.)

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


Sincerely yours
Eugene Mayevski
#23400
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.
#23401
Posted: 02/11/2013 09:47:40
by Eugene Mayevski (EldoS Corp.)

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
#23412
Posted: 02/12/2013 06:36:30
by Alexander Ionov (EldoS Corp.)

The issue if fixed in HelpDesk.


--
Best regards,
Alexander Ionov
Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.

Reply

Statistics

Topic viewed 564 times

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




|

Back to top

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

Got it!