Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.267 ·

Artifact preview now validates text encoding before rendering

Artifact preview now checks text encoding before trying to render a file

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaArtifactswhat it touches
KindBug Fixesin v2.1.267,
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.

See this entry in the whole of v2.1.267 →

Feedback