on 10-21-2009 7:58 AM
Hi All
I have the requirement where I need to convert Umlauts(special characters in foreign language like Ü,Ö )to plain simple english like ue , oe.
I use the following code to do the conversion:
String specialChar[]={"Ä","Ö","ö","ü","ä","Ü","
",":",":"};
String htmlChar[]={"AE","OE","oe","ue","ae","UE","","",""};
for(int i=0;i);
}
This work fine while testing in Eclipse and the umlauts get converted to english alphabets.
However after importing to PI as an archive, it looks like :
String specialChar[]={"�","�","�","�","�","�","
",":",":"};
String htmlChar[]={"AE","OE","oe","ue","ae","UE","","",""};
for(int i=0;i);
}
And if we test it in Interface mapping,No conversion happens.
Can anyone tell me why it fails in PI and how to resolve this issue?
Check your codepage settings in Eclipse editor.
It should be UTF-8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the function module ES_REMOVE_SPECIAL_CHARACTER as a model.
Regards,
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Itisha,
Perhaps the code didnu2019t get copy/pasted completely into your forum message, but please try the following:
for(int i=0;i<htmlChar.length;i++) {
trace.addWarning("index of [" + specialChar<i> + " is [" + dataType.indexOf(specialChar<i>) + "]");
dataType=dataType.replaceAll(specialChar<i>,htmlChar<i>);
}
The question marks indicate a display issue and may not be a real issue. I would try the transformation again with the code above.
Thanks,
-Russ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.