-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled exception when cleaning message with unicode/emoji in (From:) headers. #433
Comments
update: This issue isn't limited to non-UTF8 files. Some UTF8 encoded files also throw this exception. For example, if the
There were also more emails from the the Korean address ( The best work-around seems to be to rename these .eml files so gyb skips them. |
I modified my gyb.py to catch these exceptions, printing the problem message info and continuing with the remaining messages:
Compare to original code. |
Got the fix on StackOverflow: I confirmed Korean was restored without mangling, but the emoji ended up being mangled. Perhaps because the emoji from name not wrapped in quotes? Not a big deal since emoji was from a spam email.
|
Full steps to reproduce the issue:
is not saved in UTF8 formathas unicode/emoji inFrom:
header.--cleanup
.Expected outcome: GYB gracefully handles unicode/emoji in headers, either:
Actual outcome: GYB exits with unhandled exception:
Work-around:
Convert offending .eml file to UTF8 format.Doesn't always work...Suggested alternative fix: always convert non UTF8 files to UTF8 when saving backup.
Notes:
--cleanup
is not used. (Did not confirm if text was mangled after restore.)gyb --action backup
.Mangled text:
Proper text:
The text was updated successfully, but these errors were encountered: