]> git.etc.gen.nz Git - planner-tools.git/commitdiff
Allow putting UTF-8 characters in the output.
authorAndrew Ruthven <andrew@etc.gen.nz>
Tue, 26 May 2009 02:43:27 +0000 (14:43 +1200)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Tue, 26 May 2009 02:43:27 +0000 (14:43 +1200)
Thank you to Stéphane Sinclair for making the request.

planner2csv.pl

index ba9bdf0f72579a7d5b63d5351772be368192f186..78202b1a1246ba196335437ae08156bc2a32f7cc 100755 (executable)
@@ -18,6 +18,9 @@ if (-! -f $file) {
   die "Sorry, what file do you want to convert to a CSV?\n";
 }
 
+# Spit out UTF-8 in the output.
+binmode STDOUT, ":utf8";
+
 my $parser = XML::LibXML->new;
 my $tree = $parser->parse_file($file);