on 11-25-2008 9:07 PM
Hi,
I want to remove all (128-223)the special characters that come in the mapping from the URL
http://www.danshort.com/ASCIImap/
128-223 ,I mean if any characters that come in between these numbered characters I have to remove in mapping.
please suggest.
thank you,
Sri
try a better way to get.. but here for temp solution
public static String removeSpecial(String text) {
int length = text.length();
StringBuffer buffer = new StringBuffer( );
for(int i = 0; i < length; i++) {
int ch = ( int ) text.charAt(i);
if ( ( ch < 128)) {
buffer.append( ( char ) ch );
}
}
return buffer.toString();
}
Edited by: Anand on Nov 25, 2008 10:23 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also use this blog along with the above code...
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]
HI Sri
You can use the Java code as given above
Other method can be XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/source node">
<target node>
<xsl:value-of select="replace(.,'sepcial character','')"/>
</target node>
</xsl:template>
</xsl:stylesheet>
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.