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

Still = at the end of long lines? #3

Closed
jbreitbart opened this issue Aug 9, 2015 · 1 comment
Closed

Still = at the end of long lines? #3

jbreitbart opened this issue Aug 9, 2015 · 1 comment

Comments

@jbreitbart
Copy link

I am not sure if this is really a bug or I am just using the decoder wrong.

Here is what I am doing:

dec := new(quotedprintable.WordDecoder)
b, err := dec.DecodeHeader(string(s))

There is no error returned, but the value returned be DecodeHeader is identical to the input. The input was:

http://www.ndr.de/fernsehen/sendungen/extra_3/Ein-Lied-fuer-Jean-Claude-Junc= 
ker,extra8486.html 


-- 
Sent from my mobile.= 

Any pointer would be highly appreciated.

In case it is important the complete code I am running is here: https://github.com/koffeinsource/kaffeeshare/blob/master/targets/email/extractBody.go#L109

@alexcesaro
Copy link
Owner

DecodeHeader is meant to be used on email header like Subject. To decode an email body, use Reader:

r := quotedprintable.NewReader(strings.NewReader(s))
b, err := ioutil.ReadAll(r)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants