From a72b6192edae79cb0a7c2eea4627f9d4887e2a48 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 7 Apr 2024 11:23:35 +0200 Subject: dumpstops: encode output as UTF-8 --- lib/Travelynx/Command/dumpstops.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Travelynx') 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)); -- cgit v1.2.3