[Python] Decode Bi-Directional bytes (e.g., 'iso-8859-8-i' and 'iso-8859-8-e') in Python

Discussão em 'Python' iniciado por Stack, Setembro 25, 2024.

  1. Stack

    Stack Membro Participativo

    I'm working on a project involving email headers and got stuck trying to decode header content encoded with bi-directional character sets like 'iso-8859-8-i' and 'iso-8859-8-e.' The RFC 1556 (https://www.rfc-editor.org/rfc/rfc1556.html) defines these encodings.

    When using the .decode Python function, I encounter this exception:

    LookupError: unknown encoding: iso-8859-8-i

    Any help or advice on handling both -i and -e suffixes would be awesome! Thanks!

    Continue reading...

Compartilhe esta Página