cancel
Showing results for 
Search instead for 
Did you mean: 

identify mail attachment as utf-8 and convert it into iso-8859-1

Former Member
0 Kudos

Hi,

in email sender I receive mails. Each mail has one attachment. The attachment may be encoded in iso-8859-1 or utf-8. If an attachment is in utf-8 then its content shall be converted to iso-8859-1.

Can this be achieved with a module or by any other means?

Any help is appreciated

Markus

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

If you do not know, if an attachment is UTF-8 or not, you need to write an adapter module to identify the codepage and do the conversion.

In standard you have to make sure that all email attachments have the same codepage.

Regards

Stefan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hallo Herr Reckzügel,

vielleicht hilft das:

How To Work with Character Encodings in Process Integration https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79...

Seite 4.

Grüße aus Karlsruhe.

Mario Müller (energy4u)

Edited by: Mario Müller on Jul 25, 2008 10:25 AM

Former Member
0 Kudos

Hi,

thanks to Mario for the pointer to the document. It describes a solution (with the MessageTransformBean) how to perform a codepage conversion when the codepage of the origin is clear.

However, this solution can not be applied for this case where only a few of the messages contain attachments that are encoded in UTF-8.

However, I have tried the TextCodepageConversionBean in conjunction with the PayloadSwapBean because the MIME type of the attachment is always text/plain. My configuration is as follows:

localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean TRANSFORM

AF_Modules/TextCodepageConversionBean Local Enterprise Bean 1

sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local... mail

TRANSFORM swap.keyName payload-name

TRANSFORM swap.keyValue MailAttachment-1

1 Conversion.charset iso-8859-1

Expected was to get the attachment in XI using iso-8859-1. Instead the attachment is still in UTF-8. Moreover XI changed the first two special characters of the attachment (looking like yp) to four other special characters

Can anyone help?

Best regards

Markus