File chunk reads no longer cut a multi-byte character in half at the boundary
When Claude Code reads a file in chunks (for example, reading just the end of a large file), it now checks up to 3 bytes before a chunk boundary to see whether it would split a multi-byte UTF-8 character (used for non-ASCII text like accented letters, emoji, or non-Latin scripts) in half. If so, the chunk is trimmed to avoid cutting the character apart. It also strips a leftover byte that can result from a byte-order-mark (a marker some files use at the start to indicate text encoding).
Previously, reading a chunk of a file could end mid-character, producing garbled or invalid text in the output. This fix ensures chunked file reads always end on a clean character boundary.