Handle invalid UTF8 in encoding test helpers
Handle invalid UTF8 in encoding test helpers

Signed-off-by: Tim Clem <a3e1016a2063333dd2915d7d3fd8e3934b3e7888@gmail.com>

tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter