on 08-13-2010 12:28 PM
Hello All,
I have replace the below given special characters with diffrent strings using UDF.
Can someone please help me to do that. I am not very good at java.
Symbol change to
u2122 *T
® *R
° *D
Thanks,
Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this below code for the special characters; Instead of & you can place what ever you have the special characters.
Along with below code you have to use "aii_map_api" library also. This library is available in the Net.
package common.xi;
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 != '&')
out.write(read_data);
else
out.write("&".getBytes());
}
out.flush();
} catch (Exception e) {
}
}
}
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.