You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

idn.pl 304B

1234567891011121314151617181920
  1. #!/usr/bin/env perl
  2. use warnings;
  3. use strict;
  4. use Net::IDN::Encode ':all';
  5. use Unicode::Normalize;
  6. binmode(STDOUT, ":utf8");
  7. binmode(STDIN, ":utf8");
  8. while (<>) {
  9. $_ = NFC($_);
  10. if (/^[^\/].*[^\x00-\x7F]+.*/) {
  11. chomp;
  12. printf "%s\n", domain_to_ascii($_);
  13. $_ .= "\n";
  14. }
  15. } continue {
  16. print $_;
  17. }