summaryrefslogtreecommitdiff
path: root/lib/Travelynx
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-07 11:23:35 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-07 11:23:47 +0200
commita72b6192edae79cb0a7c2eea4627f9d4887e2a48 (patch)
tree1a309efa0cbdf2687ff10b1ae283a4db8dbae873 /lib/Travelynx
parent875ec1c3e551b9d31c64fd67a83738dbfa90b86d (diff)
dumpstops: encode output as UTF-8
Diffstat (limited to 'lib/Travelynx')
-rw-r--r--lib/Travelynx/Command/dumpstops.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Travelynx/Command/dumpstops.pm b/lib/Travelynx/Command/dumpstops.pm
index 79fb6ac..e6740ec 100644
--- a/lib/Travelynx/Command/dumpstops.pm
+++ b/lib/Travelynx/Command/dumpstops.pm
@@ -20,7 +20,8 @@ sub run {
$self->help;
}
elsif ( $command eq 'csv' ) {
- open( my $fh, '>', $filename ) or die("open($filename): $!\n");
+ open( my $fh, '>:encoding(utf-8)', $filename )
+ or die("open($filename): $!\n");
my $csv = Text::CSV->new( { eol => "\r\n" } );
$csv->combine(qw(name eva lat lon source archived));