Skip to content

UnicodeDecodeError: 'gbk' codec can't decode byte 0xba in position 14: illegal multibyte sequence #120

@aniude

Description

@aniude

I run tnefparse in command line with debug mode:
tnefparse winmail.dat -l DEBUG

INFO:tnefparse:Skipping checksum for performance
DEBUG:tnefparse:Attribute type: 0x001e
DEBUG:tnefparse:Attribute name: 0x1008 (MAPI_RTF_SYNC_BODY_TAG)
ERROR:tnefparse:decode_mapi exception: 'gbk' codec can't decode byte 0xba in position 14: illegal multibyte sequence
DEBUG:tnefparse:exception details:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/tnefparse/mapi.py", line 99, in decode_mapi
    attr_data, offset = parse_property(data, offset, attr_name, attr_type, codepage, num_mv_properties)
  File "/usr/local/lib/python3.9/site-packages/tnefparse/mapi.py", line 155, in parse_property
    item = item.decode(codepage)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xba in position 14: illegal multibyte sequence

It seems like the encoding charset is wrong, is that anyway to set the charset as parameter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions