$ perl -le' $_ = "\x{C9}ric"; utf8::encode($_); utf8::upgrade($_); print length; print do { use bytes; length }; ' 39 41 XXX Should be 39