From: Mischa POSLAWSKY Date: Fri, 15 Oct 2021 11:42:20 +0000 (+0200) Subject: word/edit: ignore unicode in json metadata X-Git-Tag: v1.13~142 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/027a60ece8b12690c09b5e433339b03e55df065b?ds=inline word/edit: ignore unicode in json metadata The shorthand function enables utf8 for binary safety, but breaks on "wide characters" in our encoded values (such as in label convert options). --- diff --git a/word/edit.plp b/word/edit.plp index d7f093a..1aade3e 100644 --- a/word/edit.plp +++ b/word/edit.plp @@ -228,7 +228,7 @@ else { } eval { - my $imagerow = $row->{image} && decode_json(delete $row->{image}) || {}; + my $imagerow = $row->{image} && JSON->new->decode(delete $row->{image}) || {}; while (my ($col, $val) = each %{$imagerow}) { $row->{$col} = $val; }