But SOAP is sending in a single-byte x'a3 - which is the ASCII code for a £

ASCII codes end at 0x7F. Everything beyond that is something else. ISO-8859-1 and its superset Windows-1252 use 0xA3 to represent £. So maybe SOAP is sending data encoded in ISO-8859-1 or Windows-1252. Maybe it is a different encoding that also uses 0xA3 to represent £. https://en.wikipedia.org/wiki/ISO/IEC_8859 documents that 0xA3 represents £ in ISO-8859-1, -3, -7, -8, -9, -13, -14, and -15.

I have tried using Encode's 'decode_utf8' on the string received from SOAP

How do you expect that to work? Did you actually read the Encode documentation? decode_utf8() expects a UTF-8 encoded bytestream and returns a perl string. You feed it a bytestream that is encoded in ISO-8859-1, Windows-1252, or somethings else, but not UTF-8. You need a function that can decode the encoding used for the bytestream from SOAP into a perl string. That function is called decode() and unlike decode_utf8(), it also expects an encoding name. See Encode for details.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^2: string mis-match? by afoken
in thread string mis-match? by zeltus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.