Xerces SAX encoding problems

Discussion in 'Java' started by John Smith, Sep 21, 2005.

  1. John Smith

    John Smith Guest

    I am trying to parse an XML document using SAX (xerces) but keep getting
    org.xml.sax.SAXParseException: The encoding "windows-1252" is not supported.
    How do I get the parser to either ignore the encoding or support it.

    Thanks

    Jon
     
    John Smith, Sep 21, 2005
    #1
    1. Advertising

  2. John Smith

    Roedy Green Guest

    On Wed, 21 Sep 2005 08:38:29 +0100, "John Smith"
    <> wrote or quoted :

    >The encoding "windows-1252"


    That is the default and canonical encoding used in Windows. You
    spelled it correctly.

    However, XML is an interchange format so refuses to let you use
    platform-specific encodings. Try UTF-8, if you are writing.

    If you are reading, and there truly are weird characters in there,
    convert it first. See http://mindprod.com/applets/fileio.html
    for how to read it into RAM and have 16-bit unicode.

    If everything is vanilla 7-bit ASCII, you can call it UTF-8.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 21, 2005
    #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. Pascal Lagass?
    Replies:
    2
    Views:
    802
    Pascal Lagass?
    Mar 1, 2004
  2. John Smith
    Replies:
    3
    Views:
    1,991
    Roedy Green
    Sep 27, 2005
  3. cvissy
    Replies:
    0
    Views:
    616
    cvissy
    Nov 16, 2004
  4. I Hate Sheep
    Replies:
    2
    Views:
    427
    I Hate Sheep
    Aug 3, 2005
  5. Åukasz
    Replies:
    2
    Views:
    1,585
    Stefan Behnel
    Aug 7, 2009
Loading...

Share This Page