Paul Clapham wrote:SAX parsers work perfectly well with all Unicode characters.
However your problem description is now confusing. It appears that you tested by outputting data from SAX to your console from XML, and had a problem there. Then you tested displaying a constant value into a GUI component, and that worked successfully. I don't see the test where you output data from SAX to a GUI component, and so it's still possible that your console is not a good testing tool for non-ASCII characters.
It's also possible that you are doing something like passing a Reader with the wrong encoding to the SAX parser, but you haven't posted any code so that's just speculation too.
First, I did not output the problematic data from SAX to the console - I created my objects first, using a SAX parser, and then printed the suspicious field of the object under discussion - and it appeared as I describe above. Outputting the data from the object to a TextArea still has the same problem for this name!
Hmmm. Maybe some code will be clarifying.
I have an XML file that contains data about some objects of my system. I deserialise the file into object instances with a class that uses the SAX parser. I use o CharArrayWriter for reading from the XML
and then
If the problem is not there, then the initialisation might be wrong?...