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

Discussion in 'XML' started by Manoj Nair, Jul 8, 2004.

  1. Manoj Nair

    Manoj Nair Guest

    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();
     
    Manoj Nair, Jul 8, 2004
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Jul 8, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tigerhillside
    Replies:
    3
    Views:
    505
    Joe Smith
    Feb 23, 2004
  2. jakk
    Replies:
    4
    Views:
    12,647
  3. Flip
    Replies:
    0
    Views:
    317
  4. Tejas
    Replies:
    1
    Views:
    652
    William Ahern
    Nov 14, 2007
  5. gry
    Replies:
    2
    Views:
    826
    Alf P. Steinbach
    Mar 13, 2012
Loading...

Share This Page