Skip to content
Snippets Groups Projects
Commit 855d140b authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

utf8 handling

parent c3694bee
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,7 @@ sub getContainerPublicMetadata
{
eval
{
# utf8::upgrade($res1);
$info= from_json(decode("utf8", $res1));
$info= from_json($res1);
};
if ($@)
{
......@@ -37,6 +36,7 @@ sub getContainerPublicMetadata
}
}
# TODO: Error handling!
$info;
}
......@@ -51,15 +51,13 @@ sub utheses_request
my $req_url= join ('/', $api_url, $what, $id);
print __LINE__, " req_url=[$req_url]\n";
my $req = HTTP::Request->new(
$method => $req_url,
);
my $req = HTTP::Request->new( $method => $req_url );
my $ua= LWP::UserAgent->new;
my $res= $ua->request($req);
# print __LINE__, " res: ", main::Dumper($res);
my $txt= $res->content();
my $txt= decode("utf8", $res->content());
return ($res->code(), $txt);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment