on 01-06-2010 6:28 AM
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 " € " and £ as
" £ "
Whether ISO-8859-1 supports all the special characters.or I need to use some other encoding.
Regards,
Nutan
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This got resolved after creating an another java mapping after XSLT mapping.My message mapping was unable to recognize <€> and <£> so I created a java mapping to convert & as <&> but it distroyed the <€> to <&#8364;> same for pound sign also.If I use to handle to convert it while mapping then XSLT mapping changed <£> to ? so used another Java mapping after XSLT mapping to change <&#8364;> to <€>.It got resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nutan,
Please check the below link..
Regards,
Navneet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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("&#".getBytes());
}
}
out.flush();
}
catch (Exception e)
{
}
}
}
Regards,
Nutan
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
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 < & > 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 < & > 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
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.