problem with special characters

251 views
Skip to first unread message

calford

unread,
Jun 2, 2010, 5:24:32 AM6/2/10
to AdWords API Forum
Hi,

I am having a problem using special characters for (not limited)
french and italian accents (or extra characters).

I am using the PHP library and encoding the information before sending
it to the service like this:
$k1->text =utf8_encode(' contrefaçon');

but when i receive the response i get weird non-encoded characters:

...
object(Keyword)#247 (5) {
["text"]=>
string(22) "contrefaçon"
["matchType"]=>
string(5) "BROAD"
...

how do i fix that?

I will also need to use the system with japanese and chinese
characters, i image there will be a problem there, would the same
solution apply?

thanks

AdWords API Advisor

unread,
Jun 7, 2010, 12:20:31 PM6/7/10
to AdWords API Forum
Hi,

The returned keyword text will be UTF-8 encoded, so you will need to
use the corresponding utf8_decode() function to convert it back into
ISO-8859-1. More information about special characters is available in
the README:

http://code.google.com/p/google-api-adwords-php/source/browse/trunk/README#231

Best,
- Eric Koleda, AdWords API Team
Reply all
Reply to author
Forward
0 new messages