On Mon, Jan 10, 2011 at 1:54 PM, Tony Cook <tony@develop-help.com> wrote: > Actually, looking at how this is all implemented, the solution could > be as simple as: > > SvSETMAGIC(sv); > > since Perl_magic_setutf8() clears the saved length and pos cache. > > Putting that in XS_utf8_decode() in universal.c would be safest in > terms of the least side-effects on other code, but may leave other > code that calls sv_utf8_decode() with the same problem. Adding a sv_utf8_decode_flags() may mitigate that a little, though we certainly don't have a lack of *_flags functions. LeonThread Previous