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

6006Re: [soaplite] Encoding text from server

Expand Messages
  • Hugues de Mazancourt
    Aug 31, 2007
    • 0 Attachment

      Le 31 août 07 à 02:04, Morgan Fletcher a écrit :

      I am querying a service like so:

      $response = SOAP::Lite
      ->service("http://thing1. thing2.com: 10000/FOO. wsdl ")
      -> getId("$r");

      Some of the records I get contain characters like this: \205 \256. 
      (represented as best I can) When I get a record like that I get:

      There's a *real* problem with the way Perl handles UFT-8 strings (or what it this is Unicode strings). You can't really predict what will happen to non-ASCII data when different packages, layers, system variables (such as LANG) are involved.
      My solution to these problems was to Base64-encode/decode all data before sending them over the network.
      See MIME::Base64 package

      Best,

      Hugues

    • Show all 5 messages in this topic