$s1 = "abc\x80"; $s2 = $s1; # currently SVf_UTF8 not set; string uses 4 bytes of storage $s2 .= "\x{100}"; # currently perl upgrades to SVf_UTF8 and converts the 0x80 and 0x100 into multi-byte representations chop($s2); # currently perl doesn't downgrade; the 0x80 codepoint still stored as 2 bytes ok($s1 eq $s2); ok(length($s1) == length($s2));