Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Any difference between UTF-8 and utf8 for XML on different systems?

Reply
Thread Tools

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

 
 
Manoj Nair
Guest
Posts: n/a
 
      07-08-2004
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();
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      07-08-2004


Manoj Nair wrote:

> 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.

--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
given char* utf8, how to read unicode line by line, and output utf8 gry C++ 2 03-13-2012 04:32 AM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
what's the difference between the different the different GraphicConfigurations Flip Java 0 07-30-2004 03:50 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57