This may be a pointless aside, but when you say "There are 10 bytes" don't you mean that the string has ten utf characters? I don't know utf, but those hex codes (\x{8c61}) are sixteen bits or two bytes each, right? (Just curious, as I've never worked with utf-8...)