So this is all well and good, BUT: people have their Punycode converters online which for example encodes "!" to "xn--!". An exclamation mark is an ASCII character, so it doesn't get encoded. AN exclamation mark ISN'T a valid character in a domain name so the LDH prefix there doubly makes no sense. Either create a Punycode encoding tool or an IDN encoding tool but not whatever this is.