Skip to content

Incorrect encoding detection in Reports.get_report_document for ISO-8859-1 documents in version 2.1.5 #1981

@TSLdob

Description

@TSLdob

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:

  • OS: Windows

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions