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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

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

Post 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.
User avatar
snowrhythm
Forum Commoner
Posts: 75
Joined: Thu May 04, 2006 1:14 pm
Location: North Bay Area, CA

Post 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...
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

Post 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).
Post Reply