jlevers / selling-partner-api

A PHP client library for Amazon's Selling Partner API
BSD 3-Clause "New" or "Revised" License
404 stars 196 forks source link

Download report, Japanese garbled characters #520

Open fengruilk opened 1 year ago

fengruilk commented 1 year ago

Problem description:

Error:


Use $docToDownload = new SellingPartnerApi\Document($reportDocumentInfo, $reportType);
$contents = $docToDownload->download();
$data = $docToDownload->getData();
Download the report data, there is no error in English, but the title in Japanese is garbled, and some garbled characters will cause data misalignment

Code

// Your code here...PLEASE make sure to redact secrets from your code!

Seller Central SP API config page screenshot

``

dartheditous commented 1 year ago

Which report, and what did you subsequently do with $data to get the screenshot?

fengruilk commented 1 year ago

This is what I converted to json. I tested $data = $docToDownload->getData() yesterday; after directly outputting the array, it is also garbled, and if there is a \t character, it will cause an error bit