forecho / amazon-mws

Interaction with the Amazon api for vendors called MWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feed XML requires UTF-8 Encoding

mfrederico opened this issue · comments

Kept getting my feed submissions cancelled and spent the past 4 days troubleshooting everything.
It came down to changing my xml header to be:

<?xml version="1.0" encoding="UTF-8"?>

Made all the difference in the world

In arrayToXml:
return ArrayToXml::convert($array, $customRoot,true,'UTF-8');

Is this the actual file that you submit?
If so, this lib / mws in general is just the way to transport the file. The actual data doesn't get verified with this api & lib.

Is this the actual file that you submit?
If so, this lib / mws in general is just the way to transport the file. The actual data doesn't get verified with this api & lib.

No, I'm sending XML of feed data. Amazon required my feed data to be UTF-8 formatted, but this library defaults it to ISO-8859-1 which was causing my feeds to be cancelled for days. The fix to the ArrayToXml::convert line made all the difference in my feeds going through.