]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #3754: encode JSON as utf8 for CLI
authorStefan Hrdlicka <s.hrdlicka@proxmox.com>
Wed, 11 May 2022 12:42:37 +0000 (14:42 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 12 May 2022 15:20:47 +0000 (17:20 +0200)
since this output is printed to the command line it should
be encoded to avoid the wide character warnings

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
PVE/CLI/qm.pm

index cf0d6f3daf66ad8b39f1483de34c77ed89044b6b..6a2e1618c1514c0ce52df26fa1a9f88fbead36b6 100755 (executable)
@@ -857,7 +857,7 @@ my $print_agent_result = sub {
        return;
     }
 
-    print to_json($result, { pretty => 1, canonical => 1});
+    print to_json($result, { pretty => 1, canonical => 1, utf8 => 1});
 };
 
 sub param_mapping {