Re: Report encoding issues

2014-03-11 Thread Josh Radcliff (AdWords API Team)
Hi,

The strings should be encoded in UTF-8.  It's quite possible I'm missing 
something here, but if you already have the reportCampaignName String 
below, why do you need to convert it to a new String in another CharSet? 
 Couldn't you just use reportCampaignName directly?  I just ran a quick 
test of reading the response input stream and the decoding worked as 
expected.

Thanks,
Josh, AdWords API Team

On Tuesday, March 11, 2014 1:07:43 AM UTC-4, assaf wrote:

 Hi,

 This may be a little basic but it is a first time that I actually need 
 strings (names) from my reports and not numeric statistics..
 I generate SEARCH_QUERY_PERFORMANCE_REPORT successfully.

 I am trying to read the String name fields 
 (CampaignName,KeywordTextMatchingQuery etc.) directly from the InputStream 
 (I do this fine in other reports).
 I can't encode the strings properly to hebrew - I tried several options - 
 but none gave proper chars (only strange chars , not '???').

 String campaignName1 = StringUtil.toUTF(reportCampaignName);
 String campaignName2 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),UTF-8);
 String campaignName3 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),WINDOWS-1255);

 Any idea how to convert it properly?

 Thanks.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Report encoding issues

2014-03-11 Thread assaf
The campaignName that arrived from the XML is not encoded properly I guess 
(just printing it out to the console produces
strange chars like - ׳?׳™׳?׳× ׳?׳?׳•׳§׳“ - ׳‘׳×׳™ ׳?׳?׳•׳?)
If it came in encoded properly I would be seeing proper hebrew chars..



On Tuesday, March 11, 2014 6:49:49 PM UTC+2, Josh Radcliff (AdWords API 
Team) wrote:

 Hi,

 The strings should be encoded in UTF-8.  It's quite possible I'm missing 
 something here, but if you already have the reportCampaignName String 
 below, why do you need to convert it to a new String in another CharSet? 
  Couldn't you just use reportCampaignName directly?  I just ran a quick 
 test of reading the response input stream and the decoding worked as 
 expected.

 Thanks,
 Josh, AdWords API Team

 On Tuesday, March 11, 2014 1:07:43 AM UTC-4, assaf wrote:

 Hi,

 This may be a little basic but it is a first time that I actually need 
 strings (names) from my reports and not numeric statistics..
 I generate SEARCH_QUERY_PERFORMANCE_REPORT successfully.

 I am trying to read the String name fields 
 (CampaignName,KeywordTextMatchingQuery etc.) directly from the InputStream 
 (I do this fine in other reports).
 I can't encode the strings properly to hebrew - I tried several options - 
 but none gave proper chars (only strange chars , not '???').

 String campaignName1 = StringUtil.toUTF(reportCampaignName);
 String campaignName2 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),UTF-8);
 String campaignName3 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),WINDOWS-1255);

 Any idea how to convert it properly?

 Thanks.



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Report encoding issues

2014-03-11 Thread Josh Radcliff (AdWords API Team)
Hi,

Please check the encoding being used on your terminal.  If it is not UTF-8 
then you will get strange characters as you described.

As an alternative, you could simply modify the DownloadCriteriaReport 
examplehttps://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201402/reporting/DownloadCriteriaReport.javato
 run the SEARCH_QUERY_PERFORMANCE_REPORT instead.  This example will 
write the output to a file named report.csv in your home directory.  That 
would eliminate any issues introduced by your terminal's encoding setting.

Thanks,
Josh, AdWords API Team

On Tuesday, March 11, 2014 4:10:21 PM UTC-4, assaf wrote:

 The campaignName that arrived from the XML is not encoded properly I guess 
 (just printing it out to the console produces
 strange chars like - ׳?׳™׳?׳× ׳?׳?׳•׳§׳“ - ׳‘׳×׳™ ׳?׳?׳•׳?)
 If it came in encoded properly I would be seeing proper hebrew chars..



 On Tuesday, March 11, 2014 6:49:49 PM UTC+2, Josh Radcliff (AdWords API 
 Team) wrote:

 Hi,

 The strings should be encoded in UTF-8.  It's quite possible I'm missing 
 something here, but if you already have the reportCampaignName String 
 below, why do you need to convert it to a new String in another CharSet? 
  Couldn't you just use reportCampaignName directly?  I just ran a quick 
 test of reading the response input stream and the decoding worked as 
 expected.

 Thanks,
 Josh, AdWords API Team

 On Tuesday, March 11, 2014 1:07:43 AM UTC-4, assaf wrote:

 Hi,

 This may be a little basic but it is a first time that I actually need 
 strings (names) from my reports and not numeric statistics..
 I generate SEARCH_QUERY_PERFORMANCE_REPORT successfully.

 I am trying to read the String name fields 
 (CampaignName,KeywordTextMatchingQuery etc.) directly from the InputStream 
 (I do this fine in other reports).
 I can't encode the strings properly to hebrew - I tried several options 
 - but none gave proper chars (only strange chars , not '???').

 String campaignName1 = StringUtil.toUTF(reportCampaignName);
 String campaignName2 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),UTF-8);
 String campaignName3 = new 
 String(reportCampaignName.getBytes(ISO-8859-1),WINDOWS-1255);

 Any idea how to convert it properly?

 Thanks.



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Report encoding issues

2014-03-10 Thread assaf
Hi,

This may be a little basic but it is a first time that I actually need 
strings (names) from my reports and not numeric statistics..
I generate SEARCH_QUERY_PERFORMANCE_REPORT successfully.

I am trying to read the String name fields 
(CampaignName,KeywordTextMatchingQuery etc.) directly from the InputStream 
(I do this fine in other reports).
I can't encode the strings properly to hebrew - I tried several options - 
but none gave proper chars (only strange chars , not '???').

String campaignName1 = StringUtil.toUTF(reportCampaignName);
String campaignName2 = new 
String(reportCampaignName.getBytes(ISO-8859-1),UTF-8);
String campaignName3 = new 
String(reportCampaignName.getBytes(ISO-8859-1),WINDOWS-1255);

Any idea how to convert it properly?

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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
--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.