* src/process.c (network_lookup_address_info_1): Only check multibyte
hostnames for pure-ASCII.
* test/src/process-tests.el (unibyte-domain-name): Test unibyte domain
names with network-lookup-address-info.
Lisp_Object msg = Qt;
int ret;
- if (SBYTES (host) != SCHARS (host))
+ if (STRING_MULTIBYTE (host) && SBYTES (host) != SCHARS (host))
error ("Non-ASCII hostname %s detected, please use puny-encode-domain",
SSDATA (host));
ret = getaddrinfo (SSDATA (host), service, hints, res);
(should-error (network-lookup-address-info "faß.de"))
(should (length (network-lookup-address-info (puny-encode-domain "faß.de")))))
+(ert-deftest unibyte-domain-name ()
+ "Unibyte domain names should work"
+ (should (length (network-lookup-address-info (string-to-unibyte "google.com")))))
+
(ert-deftest lookup-google ()
"Check that we can look up google IP addresses"
(let ((addresses-both (network-lookup-address-info "google.com"))