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

3782RE: [soaplite] wrong encoding (perhabs caused by utf8?)

Expand Messages
  • Maurice McCabe
    Jul 20, 2004
      The XML standard requires that certain characters contained within the XML document content be escaped. Otherwise it is not a legal XML document. I use the following subroutine to do the substitution. It only contains the values I needed to escape. There may be other values not included in my list.
      sub escape {
          # must escape certain characters or the XML document is invalid
          my ($str) = @_;
          $str =~ s/</&lt;/g;
          $str =~ s/>/&gt;/g;
          $str =~ s/&/&amp;/g;
          $str =~ s/"/&quote;/g;
          $str =~ s/'/&apos;/g;
          # strip out invalid characters (according to Mircosoft)
          #$str =~ s/[:\-\n\r()]//g;

          return $str;
      -----Original Message-----  
      From: Duncan Cameron [mailto:duncan_cameron2002@...]
      Sent: Tuesday, July 20, 2004 8:33 AM
      To: Marten Lehmann; soaplite@yahoogroups.com
      Subject: Re: [soaplite] wrong encoding (perhabs caused by utf8?)

      At 2004-07-20, 16:22:06 Marten Lehmann <lehmann@...> wrote:

      >I did some experiments, but I couldn't solve the problem. I installed
      >the latest SOAP-Lite (0.60a) on client and server, but I still get e.g.
      >instead of &euro;
      >How can I check if the problem is on client or server side and locate
      If your server returns the string '&euro;', SOAP::Lite should escape
      the & when creating the message and un-escape at the client. Can you
      provide samples of your client and server code?


    • Show all 7 messages in this topic