Results 1 to 3 of 3
  1. #1
    sasi25 is offline Member
    Join Date
    Dec 2009
    Posts
    4
    Rep Power
    0

    Default sun.io.MalformedInputException

    Hi ALL,

    i am getting the following error while reading the XML file

    sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java: 262)


    Can anyone help me how to resolve this issue?

    Many Thanks.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,434
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by sasi25 View Post
    Hi ALL,
    sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java: 262)
    Just as the Exception tells you: your XML isn't well formed but what surprises me is that you get an Exception from the sun.io package; that is not supposed to happen. What XML parser are you using?

    kind regards,

    Jos

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    You are not having an XML problem, you are having a character encoding problem. The method is expecting, as far as I can tell, an array of bytes that represent valid UTF8 characters. If the input is not encoded in UTF8 but something else, such as ISO 8859-1, which is the Windows encoding, you can get this exception.

    Make sure you know the encoding of your input document. Some text editors can modify the encoding; you might try changing the encoding to UTF8 and then saving.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •