From 1c80f35a18e4a023b269c4b506cdd073c5796793 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 20 Mar 2022 11:57:02 +0100 Subject: fix marudor.de auslastung (IRIS uses iso-8859-1 in an "utf-8" document) --- lib/DBInfoscreen/Helper/Marudor.pm | 6 ++++-- 1 file 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}" -- cgit v1.2.3