msg_dialog_text_tests checks ASCII, two-, three- and four-byte sequences, the replacement of an invalid lead byte, a stray continuation byte, overlong forms, an encoded surrogate, a code point past U+10FFFF and truncated or broken sequences.