Hi Jon,
I'll ask the Perl library maintainer to follow up with you over the issue
tracker, but from an initial glance, your fix seems correct - gzip is a
binary file, so writing it to a utf-8 encoded file will corrupt it.
Cheers,
Anash P. Oommen,
AdWords API Advisor.
On Tuesday, 30 October 2012 00:40:23 UTC+5:30, Jon wrote:
>
> I'm not sure this is the right way to solve the problem, but if I undo
> this change from the last commit, the problem goes away.
>
> Index: lib/Google/Ads/Common/ReportUtils.pm
>
> @@ -135,7 +140,7 @@
> # If not gzip support then we can stream directly to a file.
> $response = $lwp->request($request, $file_path);
> } else {
> - open(FH, ">", $file_path) or warn "Can't write to '$file_path': $!";
> + open(FH, ">:utf8", $file_path) or warn "Can't write to
> '$file_path': $!";
> $response = $lwp->request($request);
> # Need to decode in a file.
> print FH $response->decoded_content();
>
> On Monday, October 29, 2012 1:48:59 PM UTC-5, Jon wrote:
>>
>>
>> I'm seeing this as well. I added issue 51 for it.
>>
>> On Monday, October 29, 2012 12:10:58 PM UTC-5, Takeshi Hagikura wrote:
>>>
>>> Hello Jay,
>>>
>>> Can you please create a new issue on the issue tracker?
>>> http://code.google.com/p/google-api-adwords-perl/issues/list
>>>
>>>
>>> 2012年10月29日月曜日 17時13分38秒 UTC+9 Takeshi Hagikura:
>>>>
>>>> Hello Jay,
>>>>
>>>> Sorry for the inconvenience.
>>>> I'll consult the maintainer of the perl client library.
>>>>
>>>> Let me clarify, are you able to use GZIPPED_XML before upgrading to the
>>>> perl 2.7.3?
>>>>
>>>> Best,
>>>> - Takeshi, AdWords API Team
>>>>
>>>> 2012年10月28日日曜日 4時10分46秒 UTC+9 Jay Chan:
>>>>>
>>>>> Since upgrading to the perl 2.7.3 API, I have not been able to use
>>>>> downloadFormat GZIPPED_XML in either the old v201109 API or the v201206
>>>>> API.
>>>>>
>>>>> Under linux the gzip files seem to be corrupted. They can be
>>>>> downloaded in any non-compressed format *XML,CSV) with no problem.
>>>>>
>>>>> Any thoughts?
>>>>> Thanks.
>>>>>
>>>>
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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