summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-03-20 11:57:02 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-03-20 11:57:02 +0100
commit1c80f35a18e4a023b269c4b506cdd073c5796793 (patch)
tree71fe3ad05d30b937904bcf1753ad385b5d368226 /lib
parent0fca16604b0757275bbe0023e23109d8ecd0bb0b (diff)
fix marudor.de auslastung (IRIS uses iso-8859-1 in an "utf-8" document)4.9.2
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Helper/Marudor.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Helper/Marudor.pm b/lib/DBInfoscreen/Helper/Marudor.pm
index 60ab17a..8b2e5b2 100644
--- a/lib/DBInfoscreen/Helper/Marudor.pm
+++ b/lib/DBInfoscreen/Helper/Marudor.pm
@@ -145,8 +145,10 @@ sub get_train_utilization {
return $promise;
}
- $this_station = url_escape($this_station);
- $next_station = url_escape($next_station);
+ $this_station
+ = url_escape( encode( 'utf-8', decode( 'iso-8859-15', $this_station ) ) );
+ $next_station
+ = url_escape( encode( 'utf-8', decode( 'iso-8859-15', $next_station ) ) );
$self->get_json_p( $self->{realtime_cache},
"https://marudor.de/api/hafas/v2/auslastung/${this_station}/${next_station}/${train_no}/${dep}"