Here's a first draft patch for internationalized domain name support. I implemented it based on the pseudocode in RFC3492[1]. [1] https://tools.ietf.org/html/rfc3492