my $content = encode_utf8(encode_json($data));Note: at least encode_json of JSON::PP produces a byte-string already encoded to UTF-8, so encoding it once more will lead to bugs the moment you encounter a non-ASCII character in the document.
In reply to Re^4: Runs from Command Line but NOT from Perl
by Anonymous Monk
in thread Runs from Command Line but NOT from Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |