[pve-devel] [PATCH qemu-server] fix #3754: encode JSON as utf8 for CLI

Stefan Hrdlicka s.hrdlicka at proxmox.com
Wed May 11 14:42:37 CEST 2022


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 at proxmox.com>
---
 PVE/CLI/qm.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index cf0d6f3..6a2e161 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -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 {
-- 
2.30.2





More information about the pve-devel mailing list