Describe
In version 1.9.60, the Reports.get_report_document method correctly identified the encoding of report documents as ISO-8859-1. However, in version 2.1.5, the same documents are incorrectly detected as UTF-8, leading to potential issues with parsing or displaying content for certain locales and report types.
To Reproduce
Reports().get_report_document(
reportDocumentId=reportDocumentId,
download=True,
)
Observe the encoding detected in document_response.encoding for the document.
Expected behavior
The encoding should be correctly identified as ISO-8859-1 for documents from Marketplaces.JP with the report type "GET_LEDGER_DETAIL_VIEW_DATA".
Desktop:
Additional context
This issue appears to be specific to certain marketplaces and report types, such as Marketplaces.JP with the report type "GET_LEDGER_DETAIL_VIEW_DATA". Other marketplaces or report types may not be affected.