forecho/amazon-mws

Feed XML requires UTF-8 Encoding

mfrederico opened this issue · 3 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.