Found it Jeff, the encoding of the nuSoap class is set to iso-8859-1
by default, changed that to UTF-8.

var $soap_defencoding = 'UTF-8'; (everywhere)
var $xml_encoding = 'UTF-8'; (class.soap_server.php)
var $decode_utf8 = false;   (everywhere)

Add to function  serializeEnvelope(...) in class.nusoap_base.php and
nusoap.php
    $body=utf8_encode($body);
    $headers=utf8_encode($headers);

NuSoap 0.7.2

Thanks for the assistance,

Bram
On Aug 22, 5:52 pm, AdWords API Advisor <[EMAIL PROTECTED]>
wrote:
> Hello Bramiozo,
>
>  All communications with the AdWords API should be encoded as UTF-8.
> I'm not sure why you're sending in seed URLs encoded as euc-kr, but
> I'd recommend sending them in as UTF-8 encoded text to ensure that
> they're not misinterpreted.
>
>  As for the response, those too should be encoded UTF-8 by the server.
> If there aren't any characters outside of the first 127 ASCII
> characters in the response then it's possible that whatever logic is
> in place to detect theencodingis just confused, as the UTF-8
> representation of the first 127 characters should be identical to that
> of ASCII.
>
>  Can you capture the raw XML that is being sent and received (ideally
> at the network level before it's processed by whatever high-level
> language you're using) to check to see how things are being
> represented there?
>
> Cheers,
> -Jeff Posnick, AdWords API Team
>
> On Aug 21, 1:31 pm, bramiozo <[EMAIL PROTECTED]> wrote:
>
> > function googleKeywordFromSite($seedUrl,
> > $language=0,$locale=0,$includeLinks=0){
> > //http://www.google.com/apis/adwords/developer/KeywordToolService.html
>
> >         IF($language===0)
> >                 $language="";
> >         ELSE
> >                 $language="<languages>".$language."</languages>";
>
> >         IF($locale===0)
> >                 $locale="";
> >         ELSE
> >                 $locale="<countries>".$locale."</countries>";
>
> >         IF($includeLinks===0)
> >                 $links="<includeLinkedPages>false</includeLinkedPages>";
> >         ELSE
> >                 $links="<includeLinkedPages>true</includeLinkedPages>";
>
> >         $request_xml="<getKeywordsFromSite>".
> >         "<url>".$seedUrl."</url>".
> >         $links.$language.$locale."</getKeywordsFromSite>";
>
> >    $keywords = $this->estimator_service->call('getKeywordsFromSite',
> > $request_xml);
> >    $keywords = $keywords['getKeywordsFromSiteReturn'];
>
> >         if ($this->debug) $this->show_xml($this->estimator_service);
> >         if ($this->estimator_service->fault) $this->show_fault($this-
>
> > >estimator_service);
>
> >         return $keywords;
>
> > }
>
> > ////////////////////////////////////////////////////////////
> > $Keywords=$adRes->googleKeywordFromSite('http://www.naver.com/','ko','KR',1);
>
> > FOR($i=0;$i<count($Keywords['keywords']);$i++){
> >         echo "<br> group: ".$Keywords['groups'][$Keywords['keywords'][$i]
> > ['groupId']];
> >         echo "<br> term: ".$Keywords['keywords'][$i]['text'];
> >         echo "&nbsp;|&nbsp; advertiser competition: ".$Keywords['keywords']
> > [$i]['advertiserCompetitionScale'];
> >         echo "&nbsp;|&nbsp; search volume: ".$Keywords['keywords'][$i]
> > ['searchVolumeScale'];
>
> > }
>
> > I get question marks for the keywords....when I check forencoding
> > using mb_detect_encoding it gives ASCII which means it's encoded as
> > ASCII in the array. Theencodingof the seed url is euc-kr btw.
>
> > Why aren't I receiving UTF-8 encoded terms ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to