Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-91

MinML does not handle XML encoding properly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When you implement your own XML-RPC transport layer and call

      XmlRpcServer.execute(InputStream in, XmlRpcContext context);

      the following happens:

      First, XmlRpc.parse(InputStream is) calls MinML.parse(new InputSource(is).

      Then, MinML.parse(...) calls parse(new InputStreamReader(source.getByteStream()));

      which is wrong: this parses the stream with the platform default encoding, regardless of the actual encoding used in the XML stream, destroying, eg, UTF-8 encoded characters on Windows.

      Together with #XMLRPC-90, XmlRpc could be changed to use the Java 1.4 oder 1.5 platform XML parser which respect handle streams correctly and use any encoding declaration embedded in the XML stream.

      Workaround: Use XmlRpc.setDriver("xerces") and add xercesImpl.jar to the classpath.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jschwarze Jochen Schwarze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: