diff -r ccd653a54263 -r 95feee1af1da whois/__init__.py --- a/whois/__init__.py Fri Jan 20 15:25:04 2017 +0800 +++ b/whois/__init__.py Fri Jan 20 15:33:38 2017 +0800 @@ -14,6 +14,7 @@ from .whois import NICClient + def whois(url, command=False): # clean domain to expose netloc ip_match = re.match(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", url) @@ -34,7 +35,7 @@ else: # try builtin client nic_client = NICClient() - text = nic_client.whois_lookup(None, domain, 0) + text = nic_client.whois_lookup(None, domain.encode('idna'), 0) return WhoisEntry.load(domain, text)