Details
Description
Our debugger trace output currently outputs data in text and hex, but assumes utf-8 for the text.
This needs to be improved to use the currently-specified encoding, and to handle decode errors.
E.g., suppose you have !!crud!! where crud is not c.r.u.d, but some bytes that won't properly decode as characters. This wants to present in the debugger as
!!????!!
where ? is the unicode replacement character.
I believe newlines and other "moving whitespace" like tabs should also be replaced by a substitution character that says what they are. (Box character with a codepoint written inside it)