diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-05 22:27:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-05 22:27:26 +0000 |
commit | b56b320b5e2515160073fa1b469514002688fe11 (patch) | |
tree | 965a7100c5e45fca8ec803d22b8b6ce14fca4633 /Master/tlpkg/tlperl/lib/JSON/PP.pm | |
parent | d26c206452d2e285c3bbf949f34011e4a55fd8f9 (diff) |
tlperl 5.22.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@40252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/JSON/PP.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/JSON/PP.pm | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Master/tlpkg/tlperl/lib/JSON/PP.pm b/Master/tlpkg/tlperl/lib/JSON/PP.pm index c1b4f1b0f5b..7a011a4dea9 100644 --- a/Master/tlpkg/tlperl/lib/JSON/PP.pm +++ b/Master/tlpkg/tlperl/lib/JSON/PP.pm @@ -11,7 +11,7 @@ use Carp (); use B (); #use Devel::Peek; -$JSON::PP::VERSION = '2.27203'; +$JSON::PP::VERSION = '2.27300'; @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json); @@ -655,6 +655,7 @@ BEGIN { } else { utf8::upgrade( $text ); + utf8::encode( $text ); } $len = length $text; @@ -806,17 +807,12 @@ BEGIN { else{ if ( ord $ch > 127 ) { - if ( $utf8 ) { - unless( $ch = is_valid_utf8($ch) ) { - $at -= 1; - decode_error("malformed UTF-8 character in JSON string"); - } - else { - $at += $utf8_len - 1; - } + unless( $ch = is_valid_utf8($ch) ) { + $at -= 1; + decode_error("malformed UTF-8 character in JSON string"); } else { - utf8::encode( $ch ); + $at += $utf8_len - 1; } $is_utf8 = 1; @@ -1630,7 +1626,7 @@ JSON::PP - JSON::XS compatible pure-Perl module. =head1 VERSION - 2.27202 + 2.27300 L<JSON::XS> 2.27 (~2.30) compatible. @@ -2791,7 +2787,7 @@ Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt> =head1 COPYRIGHT AND LICENSE -Copyright 2007-2013 by Makamaka Hannyaharamitu +Copyright 2007-2014 by Makamaka Hannyaharamitu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |