cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Adapter - PayloadSwapBean - MessageTransformBean - German umlauts

Former Member
0 Kudos

Hi there,

I'm receiving mails with an attachment (.csv / .txt) that I want to process to get IDocs. Everything works fine but the conversion of German umlauts. I tried to apply several charsets (i.e. iso-8859-1, iso-8859-2, utf-8) in the contentType parameter without success. The result in my payload after swapping and transforming is a message without umlauts. All these characters have been replaced by the same 'character' that looks like a quadrangle. Therefore even the earliest possible mapping comes too late to convert this character back into umlauts, because I don't know anymore the original ones.

When I process the same attachment with a <u>file</u> <u>adapter</u> in the same manner (until getting an IDoc) there are no problems with umlauts, the payload looks fine!

I even checked the note 881308 (although it's said to be for the mail receiver) but it's already in the system (XI 3.0, SP 14)

Anyone an idea to solve my problem?

Regards,

Ralph

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Hi Ralph,

now I got the solution:

Allpy the MessageTransformBean twice.

First you set the code page for the mail attachment, how it comes to the system.

Then you do the conversion and set the code page how the target xml should be.

Make two entries in Module configuration:

localejbs/AF_Modules/MessageTransformBean - contenttype

localejbs/AF_Modules/MessageTransformBean - tranform

as paramters you set:

contentType - Transform.ContentType - text/plain; charset=iso-8859-1

transform - Transform.ContentType - text/xml; charset=UTF-8

transform - Transform.Class - com.sap.aii.messaging.adapter.Conversion

and so on.

The problem is that outlook does not provide the content type for the attachment, so the MailTransformBean assumes UTF-8, but the attachment has iso-8859-1, so you have to set this before the conversion.

I have tested this with XI 3.0 SP17 with note 960501 included.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Nice one :)! Very useful. Would be great if you could put this in a blog!

cheers,

Prashanth

Former Member
0 Kudos

Hi Stefan,

you saved my day. Great solution, thanks again.

Ralph

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

we are now on SP19 which includes the note 960501 completely. But I can't see any differences. No matter which ContentType is applied, there are no umlauts in the payload.

<b></b>text/plain;charset=iso-8859-1 gives �

<b></b>text/plain;charset=utf-8 gives &#65533;

And by the way, the file adapter in combination with the MessageTransformationBean was always working fine.

Are there any new ideas?

Thanks a lot,

Ralph

stefan_grube
Active Contributor
0 Kudos

Maybe the code page in the SMTP header is wrong.

Could you send me the original mail to my address: stefan.sdn@googlemail.com

I want to do some tests.

How did you create the mail?

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

I have just sent the mail.

Regards

Ralph

stefan_grube
Active Contributor
0 Kudos

See note 960501

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

thank you for your quick answer. Unfortunately I'm not the only one working with this XI System, so that I have to wait until Dec. 11 with the implementation of the note.

I'll be back in the middle of December to post the results.

Regards,

Ralph