]> git.proxmox.com Git - pve-common.git/commitdiff
use Encode::Locale to encode parameters read from console(getopt)
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 2 May 2017 09:09:35 +0000 (11:09 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 2 May 2017 09:14:36 +0000 (11:14 +0200)
src/PVE/JSONSchema.pm

index 936c3cfa7feeea0527ef19e963858374c02db99f..9c624f694c6f423ee643ef025620c369b713f5bb 100644 (file)
@@ -4,6 +4,8 @@ use strict;
 use warnings;
 use Storable; # for dclone
 use Getopt::Long;
+use Encode::Locale;
+use Encode;
 use Devel::Cycle -quiet; # todo: remove?
 use PVE::Tools qw(split_list $IPV6RE $IPV4RE);
 use PVE::Exception qw(raise);
@@ -1349,7 +1351,9 @@ sub get_options {
        }
     }
 
-    $opts = PVE::Tools::decode_utf8_parameters($opts);
+    foreach my $p (keys %$opts) {
+       $opts->{$p} = decode('locale', $opts->{$p});
+    }
 
     foreach my $p (keys %$opts) {
        if (my $pd = $schema->{properties}->{$p}) {