-
Notifications
You must be signed in to change notification settings - Fork 387
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
Decode modified UTF-7 encoded mailbox names #126
Comments
I'd accept a pull request for that. Exporting the decoding function in imap.utilities.js would be great. |
There is already a module for encoding/decoding UTF-7 for IMAP here https://github.com/kkaefer/utf7. |
@asutherland Would kkaefer's utf7 module work for you as well? If so, I can just add it as a dependency and use that. |
@mscdex It's got unit tests! I can't argue with unit tests! |
Resolved in ec01e96. Thank you both :-) |
Non-ASCII characters in mailbox names get encoded into a funky modified utf-7 encoding:
https://tools.ietf.org/html/rfc3501#section-5.1.3
Here's a patch where I decode the name and cram it in a 'displayName' field for each box for getBoxes in our somewhat divergent fork of imap.js. It has some unit tests in our idiom too.
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/80/files
If you like the idea of adding displayName or otherwise exposing the decoded name in the library, I am happy to provide a pull request against the current master branch. Or if you just want to transform what's on that patch, that's also cool.
The text was updated successfully, but these errors were encountered: