{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/12782","labels_url":"https://api.github.com/repos/golang/go/issues/12782/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12782/comments","events_url":"https://api.github.com/repos/golang/go/issues/12782/events","html_url":"https://github.com/golang/go/issues/12782","id":108835014,"number":12782,"title":"mail.Address.String() does not take care of non-ASCII name with comma","user":{"login":"cention-sany","id":12839593,"avatar_url":"https://avatars.githubusercontent.com/u/12839593?v=3","gravatar_id":"","url":"https://api.github.com/users/cention-sany","html_url":"https://github.com/cention-sany","followers_url":"https://api.github.com/users/cention-sany/followers","following_url":"https://api.github.com/users/cention-sany/following{/other_user}","gists_url":"https://api.github.com/users/cention-sany/gists{/gist_id}","starred_url":"https://api.github.com/users/cention-sany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cention-sany/subscriptions","organizations_url":"https://api.github.com/users/cention-sany/orgs","repos_url":"https://api.github.com/users/cention-sany/repos","events_url":"https://api.github.com/users/cention-sany/events{/privacy}","received_events_url":"https://api.github.com/users/cention-sany/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-29T09:54:48Z","updated_at":"2015-10-20T23:19:13Z","closed_at":"2015-10-20T23:19:13Z","body":"1. go version 1.4.2\r\n2. Linux sanydellubuntu 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n3. See my code below.\r\n4. I expected mail.Address.String() can escape the comma for non-ASCII characters.\r\n5. Comma is output without escape and cause error *mail: no angle-addr* during parsing.\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"log\"\r\n\t\"net/mail\"\r\n)\r\n\r\nfunc formatEmailAddress(emailaddress, name string) string {\r\n\ta := new(mail.Address)\r\n\tif \"\" == emailaddress {\r\n\t\treturn \"\"\r\n\t}\r\n\ta.Address = emailaddress\r\n\tif \"\" != name {\r\n\t\ta.Name = name\r\n\t}\r\n\treturn a.String()\r\n}\r\n\r\nfunc main() {\r\n\ts := formatEmailAddress(\"test.mail@gmail.com\", \"naé, mée\")\r\n\tlog.Println(s)\r\n\ta, err := mail.ParseAddress(s)\r\n\tif nil != err {\r\n\t\tlog.Println(\"error because:\", err)\r\n\t} else {\r\n\t\tlog.Println(\"name is:\", a.Name, \"email is:\", a.Address)\r\n\t}\r\n}\r\n```"}}