Any difference between UTF-8 and utf8 for XML on different systems?

Manoj Nair

Usenet Archive
Joined
Aug 22, 2000
Messages
17
Reaction score
0
I am using following code to create an XML file and which is rendered into a PDF by using XMLParser and then FOP. This works fine on windows system. But when I port the code to Unix I get "utf8 encoding error". Is there a different way I need to represent the string "utf8" on unix ? Thanks

FileOutputStream fileoutstream = new FileOutputStream(foFile); Writer writer = new OutputStreamWriter(fileoutstream, "utf8"); writer.write(foDoc.toString.trim); writer.close;
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Manoj said:
I am using following code to create an XML file and which is rendered into a PDF by using XMLParser and then FOP. This works fine on windows system. But when I port the code to Unix I get "utf8 encoding error". Is there a different way I need to represent the string "utf8" on unix ? Thanks

FileOutputStream fileoutstream = new FileOutputStream(foFile); Writer writer = new OutputStreamWriter(fileoutstream, "utf8"); writer.write(foDoc.toString.trim); writer.close;

It doesn't really look like an XML problem, I guess what you have above is Java code so maybe someone in comp.lang.java.help can help better if you provide some more details on the Java version used, the XMLParser used, the exact line causing the error, the input causing the error.
 

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

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top