From 0c05cb0e7ef0e722d566d8982b008e8c30ea2f3a Mon Sep 17 00:00:00 2001 From: qgarnier Date: Thu, 2 Sep 2021 10:24:45 +0200 Subject: [PATCH] enh(sccm): sites-status mode - better encoding management (#3074) --- apps/microsoft/sccm/local/mode/sitestatus.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/microsoft/sccm/local/mode/sitestatus.pm b/apps/microsoft/sccm/local/mode/sitestatus.pm index 09775e5ab..f23945746 100644 --- a/apps/microsoft/sccm/local/mode/sitestatus.pm +++ b/apps/microsoft/sccm/local/mode/sitestatus.pm @@ -158,10 +158,10 @@ sub manage_selection { $self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1); $self->{output}->exit(); } - + my $decoded; eval { - $decoded = JSON::XS->new->utf8->decode($stdout); + $decoded = JSON::XS->new->decode($self->{output}->decode($stdout)); }; if ($@) { $self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@");