newbie question on UTFDataFormatException

S

Sriv Chakravarthy

I recieve a UTFDataFormatException while parsing a huge xml file. What
is the meaning of this Exception and what are the possible causes ?
Could this be a problem with the application or is it purely a data
problem ?
I am using the xerces-c SAX parser.
Thanks for you help.
 
S

Sriv Chakravarthy

thanks for your response.
What is the difference between UTF-8 and LATIN1 ? If my xml document
contains all ascii chars then should the encoding be LATIN1 ?
And how will I set the encoding - as a parameter to the handler object
or in the first line of the xml file itself ( in <?xml ...> line )
 
B

Bob Foster

Sriv Chakravarthy said:
thanks for your response.
What is the difference between UTF-8 and LATIN1 ? If my xml document
contains all ascii chars then should the encoding be LATIN1 ?
And how will I set the encoding - as a parameter to the handler object
or in the first line of the xml file itself ( in <?xml ...> line )

If it's all ascii, the encoding can be ASCII. UTF-8 or LATIN1 are ok, too.
The best choice depends on what application is going to read the documents.
Every parser is required to support UTF-8; most support the others, too.

Bob Foster
http://www.xmlbuddy.com/
 
S

Sriv Chakravarthy

In xerces-c sax parser, how do you set the encoding ? is it set as the
first line <?xml...> in the xml document or is it set via a member
function ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top