Hello Michael,
Please make sure you system handles utf-8 encoding correctly. Unfortunately
I can't give more details as it is out of scope of the API and solely on
your side.
-Danial, AdWords API Team.
On Friday, December 12, 2014 5:45:09 PM UTC+3, Michael Jones wrote:
>
> Hello!
> I'm trying to add some keywords in my AdWords using PHP language. When I
> add some keywords in english it works fine, but in russian it shows me next
> error message:
>
> Notice: Failed to load response into DOM: DOMDocument::loadXML(): Empty
> string supplied as input in /var/www/html/www3.repka.com.ua/sources/repka/
> work/adwords/AdWordsApi/source/src/Google/Api/Ads/Common/Lib/AdsSoapClient
> .php on line 268 Notice: Failed to load request into DOM: DOMDocument::
> loadXML(): Empty string supplied as input in /var/www/html/www3.repka.com.
> ua/sources/repka/work/adwords/AdWordsApi/source/src/Google/Api/Ads/Common/
> Lib/AdsSoapClient.php on line 275 Notice: Failed to load response into DOM
> : DOMDocument::loadXML(): Empty string supplied as input in /var/www/html/
> www3.repka.com.ua/sources/repka/work/adwords/AdWordsApi/source/src/Google/
> Api/Ads/Common/Lib/AdsSoapClient.php on line 375 Notice: Failed to load
> response into DOM: DOMDocument::loadXML(): Empty string supplied as input
> in /var/www/html/www3.repka.com.ua/sources/repka/work/adwords/AdWordsApi/
> source/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 393[
> SoapFault]
> SOAP-ERROR: Encoding: string '\xd2...' is not a valid utf-8 string (0)
> /var/www/html/www3.repka.com.ua/sources/repka/work/adwords/AdWordsApi/
> source/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php:232
> #0: SoapClient->__soapCall(string, array, NULL, array, array)
> /var/www/html/www3.repka.com.ua/sources/repka/work/adwords/AdWordsApi/
> source/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php:232
> #1: AdsSoapClient->__soapCall(string, array)
> /var/www/html/www3.repka.com.ua/sources/repka/work/adwords/AdWordsApi/
> source/src/Google/Api/Ads/AdWords/v201409/AdGroupCriterionService.php:9936
> #2: AdGroupCriterionService->mutate(array)
> /var/www/html/www3.repka.com.ua/sources/repka/work/adwords/index.php:212
>
>
> Bellow You can see example of my code:
>
> $adGroupId = 1648319****;
> $adGroupId = (float)$adGroupId;
> $user = new AdWordsUser();
> $user->LogAll();
>
>
> $word = "Ключевое слово"; // error, but with $word = "Keyword"; it works
> fine
>
> $adGroupCriterionService = $user->GetService('AdGroupCriterionService',
> 'v201409');
> // Create keyword criterion.
> $keyword = new Keyword();
> $keyword->text = $word;
> $keyword->matchType = 'BROAD';
>
> // Create biddable ad group criterion.
> $adGroupCriterion = new BiddableAdGroupCriterion();
> $adGroupCriterion->adGroupId = $adGroupId;
> $adGroupCriterion->criterion = $keyword;
>
> // Set additional settings (optional).
> $adGroupCriterion->userStatus = 'PAUSED';
> $adGroupCriterion->destinationUrl = '
> https://repka.ua/noutbuki/asus-s301lp-s301lp-c1010h-92202/';
>
> $adGroupCriteria[] = $adGroupCriterion;
> //var_dump($adGroupCriteria);
>
> // Create operation.
> $operation = new AdGroupCriterionOperation();
> $operation->operand = $adGroupCriterion;
> $operation->operator = 'ADD';
> $operations[]
> ...
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/b3de8282-aea3-4107-bf9b-c437eb04a606%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.