You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Dave Carlson <da...@hewitt.com> on 2003/07/23 20:24:44 UTC

XML parsing error

Hi, I am new to this list. We are having a problem. We have documents with 
UTF characters in them (ie &#160; == space), and when we parse them on 
Windows, we get the correct output. However, when we parse them on Unix, 
we get either a "?" or "\040". We have been working with the Unix LANG 
environment variable, as well as "file.encoding"> We can't get this to 
output the correct value. Any assistance would be greatly appreciated.

Thanks

Re: XML parsing error

Posted by Michael Glavassevich <mr...@apache.org>.
Hello Dave,

When you refer to output, are you writing the document to System.out or
System.err? Those streams (and every other PrintStream) will write strings
in your platform's native encoding, and if a particular character cannot
be represented, it's written as a '?'. If you want to write Java strings
to a file or elsewhere in a particular encoding, you should have a look at
java.io.OutputStreamWriter.

Hope that helps.

On Wed, 23 Jul 2003, Dave Carlson wrote:

> Hi, I am new to this list. We are having a problem. We have documents with
> UTF characters in them (ie &#160; == space), and when we parse them on
> Windows, we get the correct output. However, when we parse them on Unix,
> we get either a "?" or "\040". We have been working with the Unix LANG
> environment variable, as well as "file.encoding"> We can't get this to
> output the correct value. Any assistance would be greatly appreciated.
>
> Thanks

--------------------
Michael Glavassevich
mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org