Subject: | DNS::ZoneParse Unicode |
Date: | Mon, 11 Jun 2007 04:54:34 -0700 (PDT) |
To: | bug-DNS-ZoneParse [...] rt.cpan.org, sf [...] flacks.net |
From: | Matti Linnanvuori <mattilinnanvuori [...] yahoo.com> |
The following is patch to allow Unicode characters:
Index: C:/Documents and Settings/malinnanvuori/My Documents/gbui/trunk/src/Gb/Ext/DNS/ZoneParse.pm
===================================================================
--- C:/Documents and Settings/malinnanvuori/My Documents/gbui/trunk/src/Gb/Ext/DNS/ZoneParse.pm (revision 4327)
+++ C:/Documents and Settings/malinnanvuori/My Documents/gbui/trunk/src/Gb/Ext/DNS/ZoneParse.pm (revision 7033)
@@ -181,7 +181,7 @@
my ($self, $zonefile, $contents, $origin) = @_;
$self->_initialize();
- my $chars = qr/[a-z\-\.0-9]+/i;
+ my $chars = qr/[\-\.\p{IsAlnum}]+/i;
$contents =~ /Database file ($chars)( dns)? for ($chars) zone/si;
$dns_id{$self} = $self -> _massage({
ZoneFile => $1 || $zonefile,
@@ -189,8 +189,8 @@
});
my $records = $self->_clean_records($contents);
- my $valid_name = qr/[\@a-z_\-\.0-9\*]+/i;
- my $valid_ip6 = qr/[\@a-z_\-\.0-9\*:]+/i;
+ my $valid_name = qr/[\@\p{IsAlnum}_\-\.\*]+/i;
+ my $valid_ip6 = qr/[\@\p{IsAlnum}_\-\.\*:]+/i;
my $rr_class = qr/\b(?:IN|HS|CH)\b/i;
my $rr_type = qr/\b(?:NS|A|CNAME)\b/i;
my $rr_ttl = qr/(?:\d+[wdhms]?)+/i;
__________________________________ Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr Wissen. www.yahoo.de/clever