-
Notifications
You must be signed in to change notification settings - Fork 29
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
Minor bits for UTF8=ACCEPT #114
Conversation
Sending as literal requires counting bytes, which is a pain while testing. And it causes an unnecessary slowdown due to the server roundtrip.
Without UTF8=ACCEPT/IMAP4REV2, only ASCII is legal IMAP, and some servers do reject 8-bit data in quoted-string productions. With either UTF8=ACCEPT or IMAP4REV2 enabled, sending UTF-8 is legal. ASCII-8BIT makes no sense in either case (and causes a warning).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you change the rdoc for UTF8=ACCEPT
at lines 1934-1937? I think it would be fine to simply delete that paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I accidentally approved when I intended to "request changes". The SMTPUTF8
vs UTF8=ACCEPT
needs to be resolved, at least. 🙂
Co-authored-by: nicholas a. evans <[email protected]>
That's what I get for merging conflicts manually while jetlagged. I adjusted the documentation; even with UTF8=ACCEPT it's perfectly legal to send a message with Content-Type: text/plain; charset=ebcdic, and retrieving something like BODY[1] will then retrieve EBCDIC. With BINARY (RFC 3510) you might also get a .zip file in a literal, without any encoding. |
This is great, thanks! |
One final comment. I reviewed 9051 and 6855, and there are two differences. Both support UTF8 strings etc., but two things differ:
AIUI you have a general plan of only sending the commands that are legal under both regimes, and I like that plan. The other final comment is — ask me any favour. My favourite dynamic language plus these quick responses. What a combination. I'm charmed. |
Thanks again. Your expertise is much appreciated! I'll push a very simple documentation PR with your notes in it soon, maybe tonight or tomorrow. As it currently stands, I do have plans to add more "smarts" to To your first point, we currently require the user to provide the appropriate To your second point, I'm glad you don't consider the literal8/utf8-literal extensions to append to be a priority... because I wasn't prioritizing them either (I do have an implementation of BINARY FETCH nearly ready to go). I'm assuming that nearly every ruby script or app that touches email uses the |
I don't know why I was thinking this. It's already optional, as it should be. I must have been looking at the private internal_search method. (I still intend to add auto-detection code as part of my RFC4466 return opts commit.) Anyway, I'm incorporating your notes into the rdoc for search, append, and enable, right now. 🙂 |
This really just makes testing a little bit more convenient, and avoids a warning when someone uses a utf8 string in code like
foo.select("æ")
.