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

3113Re: [soaplite] Useful module to use with SOAP::Lite

Expand Messages
  • duncan_cameron2002@yahoo.co.uk
    Nov 5, 2003
    • 0 Attachment
      At 21:02:31 on 2003-11-05 Randy J. Ray <rjray@...> wrote:

      >> Not sure that I understand the problem that you are describing. A utf8
      >> string that has no multi-byte sequences is identical to an ASCII string
      >> as it is limited to 7 bits and should then be compatible with ISO-8859
      >> encodings.
      >UTF-8 and ISO-8859-1 overlap, but are not identical.
      That's right but Pierre was referring to utf-8 encoded strings that
      don't have any utf-8 characters. I took that to mean only single byte
      character sequences, in effect 7 bit characters.

      >The problem is not with the parser module, it's with the XML specification.
      >The XML spec says that a document's encoding defaults to UTF-8 in the absence
      >of an explicit declaration.
      >Most parsers take this a step further and convert the text nodes they return
      >to the application to UTF-8 even when the document is explicitly encoded
      >otherwise. While this can be convenient, it's also consistent and predictable
      >behavior. In an application I recently wrote with XML::Parser (that did not
      >involve SOAP or XML-RPC, but did have to deal with encoding issues), I used
      >the "use bytes" pragma, and was able to do what I needed with the text data,
      >with no problems.

      I am still not convinced by Pierre's approach of messing with the
      utf-8 flag on a variable. I think that explicitly converting the
      utf-8 output from SOAP::Lite into whatever encoding he wants for his
      web page is cleaner and safer.

    • Show all 4 messages in this topic