Both CGI.pm and Getopt.pm does not decode utf8 strings, so we need
to do that manually.
RELEASE=2.0
VERSION=1.0
-PKGREL=12
+PKGREL=13
PACKAGE=libpve-common-perl
}
}
}
-
+
+ $opts = PVE::Tools::decode_utf8_parameters($opts);
+ if ($opts->{description}) {
+ print "TEST: " . PVE::Tools::encode_text($opts->{description}) . "\n";
+ }
+
foreach my $p (keys %$opts) {
if (my $pd = $schema->{properties}->{$p}) {
if ($pd->{type} eq 'boolean') {
return Encode::decode("utf8", uri_unescape($data));
}
+sub decode_utf8_parameters {
+ my ($param) = @_;
+
+ foreach my $p (qw(comment description firstname lastname)) {
+ $param->{$p} = decode('utf8', $param->{$p}) if $param->{$p};
+ }
+
+ return $param;
+}
+
sub random_ether_addr {
my $rand = Digest::SHA1::sha1_hex(rand(), time());
+libpve-common-perl (1.0-13) unstable; urgency=low
+
+ * correctly decode utf8 CLI parameters.
+
+ -- Proxmox Support Team <support@proxmox.com> Thu, 19 Jan 2012 14:04:03 +0100
+
libpve-common-perl (1.0-12) unstable; urgency=low
* new helper kvmkeymaplist()