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

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

jmhodges opened this issue Jan 17, 2014 · 6 comments

Comments

@jmhodges
Copy link
Contributor

@jmhodges jmhodges commented Jan 17, 2014

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 rsc commented Mar 3, 2014

Comment 1:

Labels changed: added release-none.

Status changed to Accepted.

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 10, 2014

Comment 2:

CL https://golang.org/cl/101330049 mentions this issue.
@griesemer
Copy link
Contributor

@griesemer griesemer commented Oct 1, 2014

Comment 3:

Labels changed: added repo-main.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 15, 2014

Comment 4:

CL https://golang.org/cl/132680044 mentions this issue.
@gopherbot
Copy link

@gopherbot gopherbot commented Nov 10, 2014

Comment 5 by grabher:

another crash
http://play.golang.org/p/U3ihauuhXK
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Mar 30, 2015

This seems like a duplicate of #7079

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

@bradfitz bradfitz closed this Mar 30, 2015
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.