]> git.openstreetmap.org Git - dns.git/commitdiff
Make sure generated KML is correctly UTF-8 encoded
authorTom Hughes <tom@compton.nu>
Thu, 13 Oct 2011 11:30:17 +0000 (12:30 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 13 Oct 2011 11:30:17 +0000 (12:30 +0100)
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 $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");
 
 $kmlwriter->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2");
 $kmlwriter->startTag("Document");