use UTF8 JSON encoding and decoding universally
fixed: Import/Export of packages with international text is broken
This commit is contained in:
parent
35bfeac0ef
commit
9ed284beec
16 changed files with 42 additions and 40 deletions
|
|
@ -20,7 +20,7 @@ use HTTP::Cookies;
|
|||
use POE qw(Component::Client::HTTP);
|
||||
use POE::Queue::Array;
|
||||
use Tie::IxHash;
|
||||
use JSON qw/ to_json /;
|
||||
use JSON qw/ encode_json /;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ sub editWorkflowPriority {
|
|||
if ($ackPriority != $newPriority) {
|
||||
# return an error
|
||||
my $error = 'edit priority setting error';
|
||||
$kernel->call(IKC=>post=>$rsvp, to_json({message => $error}));
|
||||
$kernel->call(IKC=>post=>$rsvp, encode_json({message => $error}));
|
||||
}
|
||||
$found = 1;
|
||||
last;
|
||||
|
|
@ -232,11 +232,11 @@ sub editWorkflowPriority {
|
|||
if (! $found) {
|
||||
# return an error message
|
||||
my $error = 'edit priority instance not found error';
|
||||
$kernel->call(IKC=>post=>$rsvp, to_json({message => $error}));
|
||||
$kernel->call(IKC=>post=>$rsvp, encode_json({message => $error}));
|
||||
}
|
||||
else {
|
||||
# return success message
|
||||
$kernel->call(IKC=>post=>$rsvp, to_json({message => 'edit priority success'}));
|
||||
$kernel->call(IKC=>post=>$rsvp, encode_json({message => 'edit priority success'}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ sub getJsonStatus {
|
|||
}
|
||||
}
|
||||
|
||||
$kernel->call(IKC=>post=>$rsvp, to_json(\%output));
|
||||
$kernel->call(IKC=>post=>$rsvp, encode_json(\%output));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue