Issue: #554 Reported by: @moisseevtags/1.2.0
@@ -0,0 +1,20 @@ | |||
#!/usr/bin/env perl | |||
use warnings; | |||
use strict; | |||
use Net::IDN::Encode ':all'; | |||
use Unicode::Normalize; | |||
binmode(STDOUT, ":utf8"); | |||
binmode(STDIN, ":utf8"); | |||
while (<>) { | |||
$_ = NFC($_); | |||
if (/^[^\/].*[^\x00-\x7F]+.*/) { | |||
chomp; | |||
printf "%s\n", domain_to_ascii($_); | |||
$_ .= "\n"; | |||
} | |||
} continue { | |||
print $_; | |||
} |