on 11-17-2010 11:55 AM
Hi all,
We are using the Mail Adapter to retrieve emails from an Exchange server.
In one of our tests we sent an email with the following subject:
Special Characters Test 123!"£$%^&*():@~{}[]/.,<>
However the text we received in PI was actually:
Special_Characters_Test_123!"£=?iso-8859-1?Q?=24=25=5E=26=2A=28=29=3A=40=7E=7B=7D=5B=5D=5C/=2E=2C=3C=3E?=
We have also tested each character individually and it appears that only certain sequences are causing this issue.
I suspect that this has something to do with the different character sets used by Exchange server (iso-8859-1) and PI (UTF-8).
Could anyone indicate how we could decode these characters back to normal text in our message mapping? or in any way resolve our problem?
Many thanks,
Aldo
A simple question and a lot of wrong answers.
Better you look in Wikipedia
A mail subject will always represented by a string like this, when it includes non-ascii signs.
This is email standard. There is nothing you can do to prevent this.
The subject has an identifier =? then the codepage , then the type of encoding Q = quoted-printable, then the encoded subject followed by an identifier ?=
The easiest solution for this issue: Only allow ASCII characters in email subject.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan, thanks for your reply.
I think that this explains the problem however I am still surprised that we have this limitation for the subject line.
I have carried out a test and if I take out the only non-ascii character (£) from the above subject line, the content is received correctly.
Said that, I don't think I will be able to force users not to enter non-ascii characters in the subject line. Therefore we will have to keep this problem... and get on with it.
Thanks for your help. I am giving you full marks and closing this thread.
Best.
Aldo
Hi Pothana,
I did try to change the encoding of the Exchange server to UTF-8, but there was no difference in the result.
Note that this problem is only in the subject line. If I send the same text in the content it is received correctly.
(Changing the encoding of PI is not an option... I do not have access to the Visual Administrator).
@Ninad since I am taking the Subject from the ASMA (as suggested by SAP) I don't think that changing the content encoding of the message would make a difference.
@Ashutosh I do have that document but I can't find anything that can help me in there. Do you see anything that could help resolve this specific issu?
In the mean time the problem is still there...
Thanks for any additional help you can give me,
Aldo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ciao Aldo
did you try to manipulate the codepage of the payload with Standard Adapter Module: [TextCodepageConversionBean|http://help.sap.com/saphelp_nwpi711/helpdata/en/45/da2deb47812e98e10000000a155369/content.htm]
or
[MessageTransformBean|http://help.sap.com/saphelp_nwpi711/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm]
If this will not work I suggest to write a specific java Module to fix the problem.
Francesco
Hi Francesco,
I think that these adapter modules work only on the payload of the message. Not on the adapter attributes (ASMA) from which I am taking the Subject line. (but please correct me if I am wrong).
I am thinking to write a Java user defined function to resolve the problem (not a bespoke Java adapter module) but I am not sure on how to tackle this. How would I translate that text back to normal? or how would you do it?
Many thanks,
Aldo
Hi,
This doc will help you to handle encoding for Mail adapter :
[HOW TO WORK WITH CHARACTER ENCODINGS IN PI|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42]
Regards
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try setting the content encoding parameter in sender mail adapter to base 64
http://help.sap.com/saphelp_nw70/Helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
regards
Ninad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aldo,
It looks even an empty space it is taking as '_'. You can change Exchange Server encoding to 'UTF-8' or else change the PI encoding while editing the parameter to required encoding in Visual Administrator (If you are adminstrating PI using VA).
If at all you want to handle this in mapping you can write a simple script and map the subject field to field.
Regards
Pothana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.