diff -r 0de2468a27e8 -r af839b9c0ed1 whois/whois.py --- a/whois/whois.py Fri Aug 15 17:11:52 2014 +0300 +++ b/whois/whois.py Mon Aug 18 11:25:39 2014 +0300 @@ -164,6 +164,8 @@ def choose_server(self, domain): """Choose initial lookup NIC host""" + if type(domain) is not unicode: + domain = domain.decode('utf-8').encode('idna') if (domain.endswith("-NORID")): return NICClient.NORIDHOST pos = domain.rfind('.')