UAlbanyArchives / mailbagit

A tool for creating and managing Mailbags, a package for preserving email using multiple preservation formats
https://archives.albany.edu/mailbag/
MIT License
46 stars 2 forks source link

Pst encoding #177

Closed gwiedeman closed 2 years ago

gwiedeman commented 2 years ago

Type of Contribution

What does this implement/fix? Explain your changes.

Previously, PST parsing relied on the listed encodings and failed to parse a message body if it didn't decode. EML/MBOX had implemented falling back to chardectect and finally replacing instead of failing. This implements this behavior for PST parsing too using a new safely_decode() helper method. EML/MBOX parsing has been refactored to use this helper as well.

Link to issue?

N/A

Pull Request Checklist

Please check if your PR fulfills the following requirements:

How has this been tested?

Operating System: win10 Python Version: 3.9.12

Licensing