-
Notifications
You must be signed in to change notification settings - Fork 18k
net/mail: AddressParser wrong name after decoding #19363
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
Comments
mb possible fix can be like this
|
Sorry, we can't accept or discuss code on the issue tracker. Please upload to Gerrit. See https://golang.org/doc/contribute.html |
@minaevmike rfc2047 says: + An 'encoded-word' MUST NOT appear within a 'quoted-string'. |
CL https://golang.org/cl/37811 mentions this issue. |
@hirochachacha thank you for your fix. I think that it's good enough. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
I am trying to decode email header with mail.AddressParser but when i have multiply rfc2047 decoded strings a space appears. As i undestand this happens because of joining atom's in header with space: https://github.com/golang/go/blob/master/src/net/mail/message.go#L421. I am not sure but mb it is better to decode whole header before it's parsing?
https://play.golang.org/p/GjZ2HqFgT8
What did you expect to see?
I expect to see that o.Name is equal to
Михаил Минаев
What did you see instead?
i see
Михаил Мина ев
(with space)The text was updated successfully, but these errors were encountered: