Functions for converting between UTF-8 IDNs (Internationalized Domain Names) and their ASCII-Compatible Encodings, plus a function to recognize IP addresses. Part of #548466.