Strings that are returned from the Rust implementation are encoded as
utf8. To avoid issues with certain special characters (e.g. german
umlauts), we also need to explicitly store the configuration files in
utf8 encoding.

Signed-off-by: Lukas Wagner <l.wag...@proxmox.com>
---
 src/PVE/Notify.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Notify.pm b/src/PVE/Notify.pm
index 0464362..d393a41 100644
--- a/src/PVE/Notify.pm
+++ b/src/PVE/Notify.pm
@@ -79,8 +79,8 @@ sub write_config {
     };
 
     my ($config, $priv_config) = $notification_config->write_config();
-    cfs_write_file('notifications.cfg', $config);
-    cfs_write_file('priv/notifications.cfg', $priv_config);
+    cfs_write_file('notifications.cfg', $config, "utf8");
+    cfs_write_file('priv/notifications.cfg', $priv_config, "utf8");
 }
 
 sub default_target {
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to