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
|
|
@ -96,7 +96,7 @@ sub execute {
|
|||
|
||||
# if there are urls left, we need to process again
|
||||
if (scalar(@syndicatedUrls) > 0) {
|
||||
$instance->setScratch("syndicatedUrls", JSON::to_json(\@syndicatedUrls));
|
||||
$instance->setScratch("syndicatedUrls", JSON::encode_json(\@syndicatedUrls));
|
||||
return $self->WAITING;
|
||||
}
|
||||
$instance->deleteScratch("syndicatedUrls");
|
||||
|
|
@ -120,7 +120,7 @@ sub getSyndicatedUrls {
|
|||
my $instance = shift;
|
||||
my $syndicatedUrls = $instance->getScratch("syndicatedUrls");
|
||||
if ($syndicatedUrls) {
|
||||
return JSON::from_json($syndicatedUrls);
|
||||
return JSON::decode_json($syndicatedUrls);
|
||||
}
|
||||
|
||||
my $urls = [];
|
||||
|
|
@ -131,7 +131,7 @@ sub getSyndicatedUrls {
|
|||
foreach my $asset (@$assets) {
|
||||
push @$urls, split(/\s+/, $asset->getRssUrl);
|
||||
}
|
||||
$instance->setScratch("syndicatedUrls", JSON::to_json($urls));
|
||||
$instance->setScratch("syndicatedUrls", JSON::encode_json($urls));
|
||||
return $urls;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue