Thread gethostbyname und umlautdomains: to puny or not to puny? (15 answers)
Opened by esskar at 2006-09-28 19:26

esskar
 2006-09-29 10:23
#70379 #70379
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
ok
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Encode::Punycode;
use Encode;
use Socket;

print getip( encode('Punycode', 'müller' ) . '.de' );

sub getip {
my ($host) = @_;

my $addr = gethostbyname( $host );

die "Hostname $host doesn't exist.\n"
unless $addr;

return inet_ntoa( $addr );
}
^Z
Hostname xn--mller-ha.de doesn't exist.


besser wird es dadurch ja nicht!

View full thread gethostbyname und umlautdomains: to puny or not to puny?