static String normalizeHostname ( String hostname ) { if ( needsNormalization ( hostname ) ) { hostname = IDN . toASCII ( hostname , IDN . ALLOW_UNASSIGNED ) ; } return hostname . toLowerCase ( Locale . US ) ; }
IDNA ASCII conversion and case normalization