Loading ...
Sorry, an error occurred while loading the content.

Encoding troubles

Expand Messages
  • Rutger Wessels
    Hi, Quite new to SOAP::Lite, I encouter problems with encoding. I need to access a soap object with one method. This method takes a XML message as argument
    Message 1 of 2 , Mar 8, 2004
    • 0 Attachment
      Hi,

      Quite new to SOAP::Lite, I encouter problems with encoding.

      I need to access a soap object with one method. This method takes a XML
      message as argument (which contains request) and returns another XML
      message (the response). I access the server by using WSDL. The problem
      is that characters in the response XML message are encoded in utf-8 but
      the XML declaration of the response doesn't contain an encoding
      declaration. The raw HTTP communication tells me that.

      And yes, it is XML wrapped in SOAP. Very nice HTTP communication :)


      My primary solution is to add that encoding declaration to the response.
      However, the Soap server is developed and hosted by a third party and
      they are not willing to do that (or it takes some time).

      So is there any way to convince SOAP::Lite (or Perl?) to apply correct
      decoding?

      Maybe this is just a perl problem but I hope more SOAP developer are
      dealing with these issues.

      rutger
    • Rutger Wessels
      Hi, It turns out that there are a lot of encoding issues in the application. Valfréjus is the example. the é was encoded as C3 83 C2 A9. This turned out to
      Message 2 of 2 , Mar 8, 2004
      • 0 Attachment
        Hi,

        It turns out that there are a lot of encoding issues in the application.

        Valfréjus is the example.
        the é was encoded as C3 83 C2 A9. This turned out to be twice encoded
        utf8. so in perl, I need to decode it twice. This seems to work but not
        in all cases. Unfortunately. It is a very confusing situation anyway.

        Since this application works in a client / server environment, we need
        to see where the problems start.

        At the server, we have a database, an XML interface, a webserver. I
        don't have access to that part, because it third party software.

        At the client, we have Perl, SOAP::Lite.

        Now I am wondering, does SOAP::Lite any character conversion? Or just
        pass it through without touching the data?

        I believe it works that way, because in the HTTP layer, I can see the
        wrongly coded parts.

        regards,
        rutger
      Your message has been successfully submitted and would be delivered to recipients shortly.