From 30c1ae52470653c8a5517ffb573e52a7e958ed12 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 19 Mar 2014 12:16:16 +0100 Subject: [PATCH] allow to use utf8 encoded comments --- src/PVE/Firewall.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index ba4559d..1946381 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -13,6 +13,7 @@ use File::Path; use IO::File; use Net::IP; use PVE::Tools qw(run_command lock_file); +use Encode; # dynamically include PVE::QemuServer and PVE::OpenVZ # to avoid dependency problems @@ -1213,7 +1214,7 @@ sub parse_fw_rule { my ($type, $action, $iface, $source, $dest, $proto, $dport, $sport); # we can add single line comments to the end of the rule - my $comment = $1 if $line =~ s/#\s*(.*?)\s*$//; + my $comment = decode('utf8', $1) if $line =~ s/#\s*(.*?)\s*$//; # we can disable a rule when prefixed with '|' my $disable = 1 if $line =~ s/^\|//; -- 2.39.2