Closed teb02 closed 4 years ago
Hello @teb02 ,
Thank you for posting your question about report encoding in Selling Partner API. You are correct. All reports have UTF-8 encoding in SP-API and that applies to all marketplaces.
Thanks, Evan
@evdeg this is definitely not true.
I am receiving reports encoded in iso-8859-1
from all marketplaces (tested GET_MERCHANT_LISTINGS_ALL_DATA
on MX, US, CA, DE, FR).
UTF-8 is an encoding. ISO-8859-1 is a character set. It indicates how to translate the encoded characters. ISO-8859-1 is a Western European character set. [https://www.charset.org/charsets/iso-8859-1] If you fail to use the correct character set when decoding an encoded set of characters, you will get ? characters in your decoded result. Most of the time, .NET is able to correctly translate a UTF-8 encoded set of characters, using the default character set of UTF-8, which is closely aligned to the Windows 1252 character set and the ISO-8859-1 character set. Your database, however, may or may not correctly save the characters. For instance, Chinese and Japanese characters will not display correctly on a database that uses a Latin character set.
I get encoding CP932 for the JP marketplace, like this:
<?xml version="1.0" encoding=CP932"?>
For the same report GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA retrieved via API, if I get it for a North-American based marketplace I have to open with encoding windows-1252, for European countries I need to use utf-8 Is this written in the documentation anywhere or returned in some header when retrieving the report?
EDIT: No that's defeinitely not a tab delimited flat file https://developer-docs.amazon.com/sp-api/docs/report-type-values-fba#remote-fulfillment-eligibility
Previous API generates reports in ISO-8859-1 encoding (NA). As we see now reports in NA have UTF-8 encoding.