Skip to content

mht files (and xls files containing mht content) may not be decoded using the correct charset #23

@snoopyjc

Description

@snoopyjc

mht files (and xls files containing mht content) may not be decoded using the correct charset. htmlxls2xlsx.py uses the UnicodeDammit package from bs4 to decode the contents, which guesses what encoding to use. Sometimes it guesses wrong. However, these files typically contain a line like:

Content-Type: text/html; charset="windows-1252"

which specifies the proper encoding. The call to UnicodeDammit should be changed to pass in the encoding if the file contains such a line.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions