The regex and utf8::encode() match. The 3 Unicode strings match. The byte- and unicode-strings have the same bytes. The byte- and unicode-strings are not equal. $s contains 255 bytes. $i contains 255 characters. $r contains 383 bytes.