This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
reset pos and utf8 cache when de/encoding utf8 str
authorDavid Mitchell <davem@iabyn.com>
Sat, 19 Mar 2011 19:26:49 +0000 (19:26 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 19 Mar 2011 19:41:55 +0000 (19:41 +0000)
commit75da9d4c616bae3e6791af93d2ced52dc8080f06
tree5c0043963158345e1bb1c1c21526aa604fa9f06f
parent912c63ed00375338703043928cac3c740d00cc9d
reset pos and utf8 cache when de/encoding utf8 str

When using
    utf8::upgrade
    utf8::downgrade
    utf8::encode
    utf8::decode
or the underlying C-level functions
    sv_utf8_upgrade_flags_grow
    sv_utf8_downgrade
    sv_utf8_encode
    sv_utf8_decode
and
    sv_recode_to_utf8

update the position of the pos magic, if any, and clear the utf8
length/position-mapping cache.

This fixes [perl #80190].
lib/utf8.t
sv.c