-
Notifications
You must be signed in to change notification settings - Fork 18k
mime: we don't decode quoted-printable #4411
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
Labels
Milestone
Comments
This issue was closed by revision d32d1e0. Status changed to Fixed. |
Is there a reason you wouldn't implement quoted-printable as a package under encoding and let the user do the decoding, much like you would with base64 encoded data in a multipart mime message? Alternatively do you foresee multipart.newPart growing the ability to transparently decode more types? |
Yeah, as I mentioned in comment 0, we might want to move this to a general place later. I don't know whether we should expand this to handle more encodings. I felt like this one was special enough, though. It broke common cases, preventing things like http://golang.org/pkg/net/http/#Request.FormValue from working. |
When I tryed to get HTML from MHT file (MIME HTML) I lost (in HTML code) all line endings and spaces in the text (all words are joined). Concept: mht, err := os.Open("example.mht") panicIfError(err) msg, err := mail.ReadMessage(mht) panicIfError(err) _, prm, err := mime.ParseMediaType(msg.Header.Get("Content-Type")) panicIfError(err) bnd := prm["boundary"] rdr := multipart.NewReader(msg.Body, bnd) prt, err := rdr.NextPart() panicIfError(err) buf := &bytes.Buffer{} io.Copy(buf, prt) err = ioutil.WriteFile("x.html", buf.Bytes(), os.ModePerm) panicIfError(err) |
My trouble with extract HTML part from MIME HTML file. Please see for details: http://play.golang.org/p/CPJFI_qMM4 |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: