XML Parsing
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   KV_Ravi
Posted On:   Monday, April 12, 2004 09:36 AM

Hello I have a XML file which contains some special characters like '¢', '£' and &. My java program parses the special characters and replaces them with #xA2;( for cent), and & for Ampersand symbol.When i run it in the unix box, the cent symbol is being interpreted as '?'.Whereas when i run the same code in Windows machine, it is being interpreted as cent and is working fine.Can u please tell me why the specific code is not working in Unix box but working in Windows. I would really appreciate if i get some very quick replies. InputSteam is = new FileInputStream("some.xml"); BufferedReader br = new BufferedReader(new InputStreamReader(is)); while ((line = br.readLine())!= null) { if(line.indexOf('u00A2')!=-1)   More>>

Hello
I have a XML file which contains some special characters like '¢', '£' and &. My java program parses the special characters and replaces them with #xA2;( for cent), and & for Ampersand symbol.When i run it in the unix box, the cent symbol is being interpreted as '?'.Whereas when i run the same code in Windows machine, it is being interpreted as cent and is working fine.Can u please tell me why the specific code is not working in Unix box but working in Windows. I would really appreciate if i get some very quick replies.
InputSteam is = new FileInputStream("some.xml");
BufferedReader br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine())!= null) {
if(line.indexOf('u00A2')!=-1) {
System.out.println(" cent found" );
}
Thanks a lot

   <<Less
About | Sitemap | Contact