Hi there, I am getting Content-Length header value was wrong errors when trying to set a price as a parameter insertion text. It works fine with the USD '$' symbol, but it doesn't work with the GBP '£': my $ad_param1 = Google::Ads::AdWords::v201109::AdParam->new({ adGroupId => $ad_group_id, criterionId => $keyword_id, insertionText=>'£1.00', paramIndex => "1", });
[21 Feb 2012 08:13:13,180 - INFO ] Outgoing Request: <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > <SOAP-ENV:Header> <RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <authToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</authToken> <clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201109">4094931487</clientCustomerId> <developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</developerToken> <userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201109">AwApi-Perl-2.5.5|skeniver</userAgent> <validateOnly xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</validateOnly> <partialFailure xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</partialFailure> </RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <operations> <operator>SET</operator> <operand> <adGroupId>3065323636</adGroupId> <criterionId>26364927</criterionId> <insertionText>¬£1.00</insertionText> <paramIndex>1</paramIndex> </operand> </operations> </mutate> </SOAP-ENV:Body> </SOAP-ENV:Envelope> [21 Feb 2012 08:13:13,498 - INFO ] Incoming response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <requestId>0004b974fed494600a0c981400002879</requestId> <serviceName>AdParamService</serviceName> <methodName>mutate</methodName> <operations>1</operations> <responseTime>77</responseTime> <units>1</units> </ResponseHeader> </soap:Header> <soap:Body> <mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <rval> <adGroupId>3065323636</adGroupId> <criterionId>26364927</criterionId> <insertionText>¬£1.00</insertionText> <paramIndex>1</paramIndex> </rval> </mutateResponse> </soap:Body> </soap:Envelope> It does seem to work with the EUR '€' when I hard coded it like this: my $ad_param1 = Google::Ads::AdWords::v201109::AdParam->new({ adGroupId => $ad_group_id, criterionId => $keyword_id, insertionText=>'€1.00', paramIndex => "1", }); The get_insertionText from the returned params is €1.00. But when I try pass in a variable, it doesn't work either. The variable is pulled from a database, so maybe there are some encoding issues, but here is the code and logs (the value of $display_price is "€1.00": my $ad_param1 = Google::Ads::AdWords::v201109::AdParam->new({ adGroupId => $ad_group_id, criterionId => $keyword_id, insertionText=>$display_price, paramIndex => "1", }); [21 Feb 2012 08:40:56,537 - INFO ] Outgoing Request: <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > <SOAP-ENV:Header> <RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <authToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</authToken> <clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201109">4094931487</clientCustomerId> <developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</developerToken> <userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201109">AwApi-Perl-2.5.5|skeniver</userAgent> <validateOnly xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</validateOnly> <partialFailure xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</partialFailure> </RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <operations> <operator>SET</operator> <operand> <adGroupId>3065323636</adGroupId> <criterionId>26364927</criterionId> <insertionText>Ä0.004</insertionText> <paramIndex>1</paramIndex> </operand> </operations> </mutate> </SOAP-ENV:Body> </SOAP-ENV:Envelope> [21 Feb 2012 08:40:56,782 - INFO ] Incoming response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Unmarshalling Error: ParseError at [row,col]:[1,1355] Message: Invalid byte 1 of 1-byte UTF-8 sequence. </faultstring> </soap:Fault> </soap:Body> </soap:Envelope> I also tried to make sure the $display_price variable was a string by passing it in quote marks: my $ad_param1 = Google::Ads::AdWords::v201109::AdParam->new({ adGroupId => $ad_group_id, criterionId => $keyword_id, insertionText=>"$display_price", paramIndex => "1", }); But still get the error: [21 Feb 2012 09:13:52,672 - INFO ] Outgoing Request: <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > <SOAP-ENV:Header> <RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <authToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</authToken> <clientCustomerId xmlns="https://adwords.google.com/api/adwords/cm/v201109">4094931487</clientCustomerId> <developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201109">REDACTED</developerToken> <userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201109">AwApi-Perl-2.5.5|skeniver</userAgent> <validateOnly xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</validateOnly> <partialFailure xmlns="https://adwords.google.com/api/adwords/cm/v201109">false</partialFailure> </RequestHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201109"> <operations> <operator>SET</operator> <operand> <adGroupId>3065323636</adGroupId> <criterionId>26364927</criterionId> <insertionText>Ä0.004</insertionText> <paramIndex>1</paramIndex> </operand> </operations> </mutate> </SOAP-ENV:Body> </SOAP-ENV:Envelope> [21 Feb 2012 09:13:52,924 - INFO ] Incoming response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Unmarshalling Error: ParseError at [row,col]:[1,1355] Message: Invalid byte 1 of 1-byte UTF-8 sequence. </faultstring> </soap:Fault> </soap:Body> </soap:Envelope> I need to be able to set params with '£' and '€' currencies. Please help me with this -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en