{"comment":{"url":"https://api.github.com/repos/puggan/letsencrypt/comments/16670135","html_url":"https://github.com/puggan/letsencrypt/commit/14d4b8cc05c900347e27e27a3ee5b23484557610#commitcomment-16670135","id":16670135,"user":{"login":"nitmir","id":5030463,"avatar_url":"https://avatars.githubusercontent.com/u/5030463?v=3","gravatar_id":"","url":"https://api.github.com/users/nitmir","html_url":"https://github.com/nitmir","followers_url":"https://api.github.com/users/nitmir/followers","following_url":"https://api.github.com/users/nitmir/following{/other_user}","gists_url":"https://api.github.com/users/nitmir/gists{/gist_id}","starred_url":"https://api.github.com/users/nitmir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitmir/subscriptions","organizations_url":"https://api.github.com/users/nitmir/orgs","repos_url":"https://api.github.com/users/nitmir/repos","events_url":"https://api.github.com/users/nitmir/events{/privacy}","received_events_url":"https://api.github.com/users/nitmir/received_events","type":"User","site_admin":false},"position":3,"line":312,"path":"letsencrypt/le_util.py","commit_id":"14d4b8cc05c900347e27e27a3ee5b23484557610","created_at":"2016-03-13T22:38:07Z","updated_at":"2016-03-13T22:38:07Z","body":"I think domain here  can be a str (the docstring tell me :type domains: `str` or `unicode`), and doing domain.encode(\"ascii\") implicitly try to convert domain to unicode (aka decode domain), raising a UnicodeDecodeError.\r\nSo then domain is a str, it raise  UnicodeDecodeError and then domain is unice it raise UnicodeEncodeError.\r\nWe probably should catch both:\r\n```\r\nexcept UnicodeDecodeError:\r\n    assume domain is str\r\nexcept UnicodeEncodeError:\r\n   assume domain is unicode\r\n```"}}