File reads now detect encoding problems and report exactly where a broken or undecodable character occurs
When Claude Code reads a file, new internal logic detects the file's text encoding (distinguishing UTF-16LE from UTF-8 by checking for a byte-order mark), then scans for the first replacement character (the symbol that appears when a byte sequence can't be properly decoded as text) or the first byte that can't be decoded at all. If either is found, the read now returns a structured result identifying the problem kind, the encoding, and the exact line and column where it occurs, instead of just returning garbled text.
This gives clearer diagnostics when a file has encoding issues, pinpointing exactly where the problem is rather than leaving Claude (or the user) to guess why a file's contents look corrupted.