summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI_XMLRPC.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-10-05 14:42:57 -0700
committerIvan Kohler <ivan@freeside.biz>2015-10-05 14:42:57 -0700
commitd942f94119fdc54dc416e309f36d385652fb5272 (patch)
tree1682ce099fd02e40a612925e449c20dd5a7f0781 /FS/FS/ClientAPI_XMLRPC.pm
parentd3880a1402fd46454ab448d59c2e4ff861094981 (diff)
fix UTF-8 in ClientAPI, RT#38254
Diffstat (limited to 'FS/FS/ClientAPI_XMLRPC.pm')
-rw-r--r--FS/FS/ClientAPI_XMLRPC.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/FS/FS/ClientAPI_XMLRPC.pm b/FS/FS/ClientAPI_XMLRPC.pm
index 435ee9835..dbcb565fa 100644
--- a/FS/FS/ClientAPI_XMLRPC.pm
+++ b/FS/FS/ClientAPI_XMLRPC.pm
@@ -30,6 +30,7 @@ L<FS::SelfService::XMLRPC>, L<FS::SelfService>
use strict;
use vars qw($DEBUG $AUTOLOAD);
+use Encode;
use FS::XMLRPC_Lite; #XMLRPC::Lite, for XMLRPC::Data
use FS::ClientAPI;
@@ -67,12 +68,17 @@ sub AUTOLOAD {
shift; #discard package name;
+
#$call = "FS::SelfService::$call";
#no strict 'refs';
#&{$call}(@_);
#FS::ClientAPI->dispatch($autoload->{$call}, @_);
- my $return = FS::ClientAPI->dispatch($autoload->{$call}, { @_ } );
+ my %hash = @_;
+ #XXX doesn't handle multi-level data structs
+ $hash{$_} = decode(utf8=>$hash{$_}) foreach keys %hash;
+
+ my $return = FS::ClientAPI->dispatch($autoload->{$call}, \%hash );
if ( exists($typefix{$call}) ) {
my $typefix = $typefix{$call};
@@ -85,7 +91,7 @@ sub AUTOLOAD {
$return;
- }else{
+ } else {
die "No such procedure: $call";
}
}