The text-only file reader can decode malformed UTF-8 with replacement characters, changing the original bytes while returning the result as text.
Reproduction: read a text-path file containing an invalid UTF-8 byte such as 0xFF.
Expected: reject invalid text with a clear unsupported-content response, while binary/resource reads preserve the original bytes.
Actual: the invalid byte is silently replaced during UTF-8 decoding.
The text-only file reader can decode malformed UTF-8 with replacement characters, changing the original bytes while returning the result as text.
Reproduction: read a text-path file containing an invalid UTF-8 byte such as 0xFF.
Expected: reject invalid text with a clear unsupported-content response, while binary/resource reads preserve the original bytes.
Actual: the invalid byte is silently replaced during UTF-8 decoding.