Page 1 of 1

why i'm getting UFT-8 instead of ISO-8859-1

Posted: Tue Jan 16, 2007 8:52 am
by mcog_esteban
Hi.
I have a wsdl file that starts with:

Code: Select all

<?xml version='1.0' encoding='ISO-8859-1'?>
.
The wsdl file is saved in ISO-8859-1 format.
The client is defined as:

Code: Select all

$cliente = new SoapClient("file.wsdl",

  array('style' => SOAP_RPC,

        'use' => SOAP_ENCODED,

        'encoding' => 'ISO-8859-1',

        'trace' => 1));
The server is the same thing.

and i'm keep getting the request and response messages in utf-8 format:

Code: Select all

Request :<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Interacesso" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">.....</SOAP-ENV:Envelope>

Response :<?xml version="1.0" encoding="UTF-8"?>
......
why i'm getting the messages in UTF-8 encoding?
thank you.

Posted: Tue Jan 16, 2007 10:14 am
by snowrhythm
Hey dude, I just read that some SOAP Clients only support encoding for UTF-8. That might be what you're facing here...

Posted: Tue Jan 16, 2007 10:33 am
by mcog_esteban
I just found that even that the messages are in utf-8 format, it saves the content right.
there's no problem with special characters (specially portuguese one).