Skip to content
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

net/mail: q decoding does not support windows-1252 and other encodings #7140

Closed
jmhodges opened this issue Jan 17, 2014 · 6 comments
Closed

Comments

@jmhodges
Copy link
Contributor

I have nice acquitances whose email addresses I would like to parse correctly, but they,
oddly, have chosen to use windows-1252 to encode their email address. In
mail.ParseAddress, any character encodings other than utf-8 and iso-8859-1 are not
handled.

It would be nice to support windows-1252 with a preference towards being able to plug
more charsets in. (Perhaps, with a similar interface as go.text/transform#Transformer.)

Example:

    str := "=?windows-1252?Q?Michael_Bo=DFlet?= <michael.bosslet@example.com>"
    a, err := mail.ParseAddress(str)
    if err != nil {
        log.Fatalf("%s", err)
    }
    log.Printf("%s", a)

This will crash, unfortunately.
@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 1:

Labels changed: added release-none.

Status changed to Accepted.

@gopherbot
Copy link

Comment 2:

CL https://golang.org/cl/101330049 mentions this issue.

@griesemer
Copy link
Contributor

Comment 3:

Labels changed: added repo-main.

@gopherbot
Copy link

Comment 4:

CL https://golang.org/cl/132680044 mentions this issue.

@gopherbot
Copy link

Comment 5 by grabher:

another crash
http://play.golang.org/p/U3ihauuhXK

@bradfitz
Copy link
Contributor

This seems like a duplicate of #7079

I'm closing this one. Please move any unique comments there.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants