summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-09-22 19:47:02 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-09-22 19:47:02 +0200
commit8bc68269d3aa2144b7f0e3838f063c0ac7a47fc9 (patch)
tree75c2311b04a00cc158481489c15b6e852d1532cf /lib/Travel/Status/DE
parent38565092afcfafbd65fe0a76bd302c454c40c608 (diff)
StopFinder: Return data with proper encoding
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/HAFAS/StopFinder.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS/StopFinder.pm b/lib/Travel/Status/DE/HAFAS/StopFinder.pm
index b654d84..f29d24c 100644
--- a/lib/Travel/Status/DE/HAFAS/StopFinder.pm
+++ b/lib/Travel/Status/DE/HAFAS/StopFinder.pm
@@ -8,6 +8,7 @@ use utf8;
no if $] >= 5.018, warnings => 'experimental::smartmatch';
use Carp qw(confess);
+use Encode qw(decode);
use JSON;
use LWP::UserAgent;
@@ -54,7 +55,7 @@ sub new {
return $ref;
}
- $ref->{raw_reply} = $reply->content;
+ $ref->{raw_reply} = $reply->decoded_content;
$ref->{raw_reply} =~ s{ ^ SLs [.] sls = }{}x;
$ref->{raw_reply} =~ s{ ; SLs [.] showSuggestion [(] [)] ; $ }{}x;
@@ -84,7 +85,7 @@ sub results {
push(
@{ $self->{results} },
{
- name => $result->{value},
+ name => decode('iso-8859-15', $result->{value}),
id => $result->{extId}
}
);