You'll notice
Artifact preview now checks text encoding before trying to render a file
What
When previewing an artifact (an HTML or text file), Claude Code now runs the underlying bytes through a decoder that detects encoding problems before rendering. If the bytes can't be decoded, or decoding required inserting replacement characters, the preview now fails with a specific error (preview_source_encoding or preview_source_replacement_char) instead of blindly converting the bytes to text and possibly rendering garbled or misleading content.
Why
This prevents artifact previews from silently showing corrupted or mangled text when a file isn't valid UTF-8, surfacing a clear error instead.