ContentHander characters discrepancy 2004-01-14 - By Carl Hume
I am experiencing a discrepancy running my application on two different servers, and I was hoping someone here could give me an idea of what to look for.
I have implemented the ContentHandler interface. While trying to parse Vitória, on my laptop, I receive the following:
byte: 86 char: V byte: 105 char: i byte: 116 char: t byte: -61 char: � byte: -77 char: � byte: 114 char: r byte: 105 char: i byte: 97 char: a
But, after moving the app to another server, I get the following:
byte: 86 char: V byte: 105 char: i byte: 116 char: t byte: -3 char: ? byte: -3 char: ? byte: 114 char: r byte: 105 char: i byte: 97 char: a
Could anyone point me to some things to check to fix this problem?
Environment (on both machines) =======# java -classpath xercesImpl.jar org.apache.xerces.impl.Version Xerces-J 2.5.0
# java -version java version "1.4.2_03"
Relevant Code ========public class SAXUpdateHandler implements ContentHandler { public void characters( char [] characters, int start, int length ) { byte[] charBytes = new byte[ characters.length ]; for( int i=0; i<characters.length; i++ ) { charBytes[i] = (byte)characters[i]; if( charBytes[i] != 0 ) { System.out.println( "byte: " + charBytes[i] + " char: " + characters[i] ); } } ... } }
Any help would be greatly appreciated. I have been banging my head against a wall so far.
Cheers! Carl
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|