Make sure generated KML is correctly UTF-8 encoded
[dns.git] / bin / mkgeo
index 880b2d56681c1143e1a76471cdc54894f07593a3..6e96c421988400bde6b5806ab39bdf9a20a1ae52 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -58,9 +58,9 @@ $countries->delete;
 
 my $zonefile = IO::File->new("> data/${zone}") || die "$!";
 my $kmlfile = IO::File->new("> kml/${zone}.kml") || die "$!";
-my $kmlwriter = XML::Writer->new(OUTPUT => $kmlfile);
+my $kmlwriter = XML::Writer->new(OUTPUT => $kmlfile, ENCODING => 'utf-8');
 
-$kmlwriter->xmlDecl("UTF-8");
+$kmlwriter->xmlDecl();
 $kmlwriter->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2");
 $kmlwriter->startTag("Document");