-
-
Notifications
You must be signed in to change notification settings - Fork 40
Store strings as &[u8] instead of &str #63
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
Conversation
Yes, this is straightforward, however it is a setback in usability. @jonhoo, any thoughts? |
Strings can be literal and are not guaranteed to be valid UTF-8 strings. It should not cause parsing errors.
Currently it causes Delta Chat to stop receiving messages due to spam messages with invalid-UTF8 subjects. Users can convert using |
Hmm, I'm curious how often invalid UTF-8 encodings actually come up? I'm not really opposed to the change, it's more that I wish it wasn't necessary. |
Yeah, exactly. This is the first time it's come up on this issue tracker, which I think at least means it's reasonably rare. |
Even if normally it never happens, someone can do it on purpose to make an IMAP client unable to parse
Do you propose to parse |
I think the real resolution is to provide both methods for operating directly on
Ah, no, I was proposing that |
It is possible to add convenience methods to
Looks like
Cool, so we agree here. Feel free to ping me if any changes to this PR are needed. |
@link2xt Yeah, again, my proposal is that we merge this, and that |
So did you assess whether any of the other uses of |
Thanks! |
I have converted envelope and address only, there may be more similar bugs, I did not check every |
@djc |
An attempt to fix #62