summaryrefslogtreecommitdiff
path: root/bin/db-iris
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-01-06 13:36:20 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-01-06 13:36:20 +0100
commitfc8447df91f8b57fe160256ebc8952f62ee17783 (patch)
tree4f84ef21f5979e15a3831d8bd6fca87a3030dae7 /bin/db-iris
parentbfadf303d147938152d6c8bcb0a9427167b42be9 (diff)
db-iris: Support unicode station / via arguments
Diffstat (limited to 'bin/db-iris')
-rwxr-xr-xbin/db-iris6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/db-iris b/bin/db-iris
index 9deaf57..eefb2c6 100755
--- a/bin/db-iris
+++ b/bin/db-iris
@@ -5,6 +5,7 @@ use 5.018;
our $VERSION = '0.00';
+use Encode qw(decode);
use Getopt::Long qw(:config no_ignore_case);
use List::Util qw(max);
use Travel::Status::DE::IRIS;
@@ -43,7 +44,10 @@ if ( @ARGV != 1 ) {
}
my ($station) = @ARGV;
-$station = get_station($station);
+
+$filter_via = decode( 'UTF-8', $filter_via );
+$station = decode( 'UTF-8', $station );
+$station = get_station($station);
for my $type ( split( qr{,}, $types ) ) {
if ( substr( $type, 0, 1 ) eq q{!} ) {