cancel
Showing results for 
Search instead for 
Did you mean: 

special character u00A3 and u20AC sign issue in File adapter

Former Member
0 Kudos

Hi Experts,

Kindly help me out. I am using file adapter and File encoding as ISO-8859-1.It's converting the file data u20AC as " &amp#8364; " and £ as

" &amp#163; "

Whether ISO-8859-1 supports all the special characters.or I need to use some other encoding.

Regards,

Nutan

Accepted Solutions (1)

Accepted Solutions (1)

shweta_walaskar2
Contributor
0 Kudos

Hi Nutan,

Did you try UTF-8?I believe these characters should be handled by UTF-8.

Let me know if it works for you.

Thanks.

Regards,

Shweta

Answers (3)

Answers (3)

Former Member
0 Kudos

This got resolved after creating an another java mapping after XSLT mapping.My message mapping was unable to recognize <&#8364;> and <&#163;> so I created a java mapping to convert & as <&amp;> but it distroyed the <&#8364;> to <&amp;#8364;> same for pound sign also.If I use to handle to convert it while mapping then XSLT mapping changed <&#163;> to ? so used another Java mapping after XSLT mapping to change <&amp;#8364;> to <&#8364;>.It got resolved.

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Please select the file type as Text and try to use UTF-8 encoding.

regards,

Navneet

Edited by: navneet sumit on Jan 6, 2010 9:50 AM

Former Member
0 Kudos

Hi Friends,

Thanks for the replies. I tried the UTF-8 in both sender and receiever channels.In moni its perfect but in output file it is showing the same conversions.

Regards,

Nutan

Former Member
0 Kudos

Hi Nutan,

Special symbols directly doesn't support the XI, for this we have to do some extra things.

Check this link for handling the & char (In your case inplace of & you can replace your special symbols)

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]

Regards

Ramesh

Former Member
0 Kudos

Hi Ramesh,

Thanks for the reply. I have done the same. This is the code:

While testing in mapping euro sign is displayed as u20AC so as per the java mapping it is getting converted as &;#8364. So what changes I need to do.Whether I have to take care of # i the code or not.

public class HandleSpecial implements StreamTransformation

{

public void setParameter(Map param)

{ }

public void execute(InputStream in,OutputStream out)

{

try

{

//String read_data;

int read_data;

int read_nxt_data;

while((read_data = in.read()) != -1)

{

if (read_data != '&')

out.write(read_data);

else

{

in.mark(1);

read_nxt_data = in.read();

if (read_nxt_data != '#')

{

in.reset();

out.write(read_data);

}

else

out.write("&amp;#".getBytes());

}

}

out.flush();

}

catch (Exception e)

{

}

}

}

Regards,

Nutan

Former Member
0 Kudos

Hi,

import java.io.InputStream;

import java.io.OutputStream;

import java.util.Map;

import com.sap.aii.mapping.api.StreamTransformation;

import com.sap.aii.mapping.api.StreamTransformationException;

public class HandleAmpersand implements StreamTransformation {

public void setParameter(Map arg0) {

}

public void execute(InputStream in, OutputStream out) {

try {

int read_data;

while ((read_data = in.read()) !=-1)

{

if (read_data != '&') // Instead of & you can use your special characters

out.write(read_data);

else

out.write("&".getBytes()); // Instead of & you can use your special characters

}

out.flush();

} catch (Exception e) {

}

}

}

Take this "aii_map_aii" jar file, take the .class file and source file and zip it then import this into imported archives in the PI and use it in the operation/interface mapping.

Regards

Ramesh

Former Member
0 Kudos

Hi,

I have checked the replies given by you all but unable to resolve it yet. Our issue is that euro sign is visible < u20AC > in SAP XI.So, when we used java mapping for special characters then & is getting converted as < &amp; > and then rest #8364; in the output file which is destorting the euro sign. Similarly,it's happening with pound sign too.Before java mapping it looks like < £ > but & is getting converted as < &amp; > and then #163; so it is not giving the euro and pound sign in the output file.Please help to resolve it.

Note: Please ignore brackets signs,i have given it because euro and pound hexa decimal forms are not visinle here.

Regards,

Nutan

Edited by: nutan champia on Jan 18, 2010 3:57 PM

Edited by: nutan champia on Jan 18, 2010 4:00 PM