[jdom-interest] Urgent: Unicode character not being displayed...
    Pandia, Rajesh 
    rajesh.pandia at matrixone.com
       
    Fri Jun  7 10:30:41 PDT 2002
    
    
  
1. Here is my message format that I am trying to parse:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Pip0A1FailureNotification>
	<ActionControl>
		<ActionIdentity>
	
<GlobalBusinessActionCode>Zürich</GlobalBusinessActionCode>
		</ActionIdentity>
	</ActionControl> 
</Pip0A1FailureNotification>
 
2.    Here's the code to parse
 public void doIt() throws JDOMException
    {
        org.jdom.input.SAXBuilder builder = new
SAXBuilder(DEFAULT_SAX_DRIVER_CLASS);
        Document doc = builder.build(fileName);
        //System.out.println(doc+": Doc");
    
        Element root = doc.getRootElement();
            
        String GlobalBusinessActionCode =
doc.getRootElement().getChild("ActionControl").getChild("ActionIdentity").ge
tChildTextTrim("GlobalBusinessActionCode");
        System.out.println("GlobalBusinessActionCode:
"+GlobalBusinessActionCode);
}
3. Here is my output.  If you notice the Unicode character in Zürich has
been replaced by Znrich.  This appears on the stdout when I print the string
value.
WebGain Java! JustInTime Compiler Version 4.00.007(x) for JDK 1.2
Copyright (C) 2000 WebGain, Inc.
GlobalBusinessActionCode: Znrich
I need immediate help.
Thanks in Advance,
- Rajesh
    
    
More information about the jdom-interest
mailing list