Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I came across an error while processing a msg file that contained non-ascii characters in the recipients' address node (
__substg1.0_0E04001E
).Unfortunately, I'm unable to share the original msg file.
I did some reading of
[MS-OXMSG].pdf
and come to the conclusion that if the node contents aren't unicode-encoded (non-Unicode
encoding) and the specification only mentions ANSI, we cannot really be sure of the original encoding used.Current version of the forked library takes care of that by using some heuristics and falling back to
cp1252
: https://github.com/JoshData/convert-outlook-msg-file/blob/primary/outlookmsgfile.py#L391That seems to make sense so I synchronized portions of the library used to parse the email properties.
It might make more sense to update the whole script to the current version but since it's listed as a "fork" I was not sure if it wouldn't overwrite any changes that you've made.