amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
612 stars 739 forks source link

Do reports have UTF-8 encoding now? #687

Closed teb02 closed 4 years ago

teb02 commented 4 years ago

Previous API generates reports in ISO-8859-1 encoding (NA). As we see now reports in NA have UTF-8 encoding.

  1. Is this correct, encoding of Reports will be UTF-8?
  2. What encoding of Reports will be for Japanese marketplace?
evdeg commented 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

tusbar commented 2 years ago

@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).

ehrowe commented 2 years ago

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.

ynaft commented 2 years ago

I get encoding CP932 for the JP marketplace, like this:

<?xml version="1.0" encoding=CP932"?>

xEverth commented 10 months ago

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?

xEverth commented 7 months ago

EDIT: image 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