Rust fs::read_to_string rejects non-UTF-8 bytes while Node fs.readFileSync utf8 replaces them

Domain: development · Evidence E1 — Maintainer reviewed
rustnodejsutf-8text-decodingsilent-data-losscross-runtime

Summary

同一条「二进制 → 文本」转换管道在两个运行时里各写了一遍:Node 侧脚本一路跑绿、数据完整;Rust 侧 UI 入口把其中两个最大的文件整份丢掉,界面不报错,只是「功能少了一大块」。Rust 侧唯一的痕迹是读取时的错误:

Source

View on GitHub →

Search

Find related lessons →

← Back to MisakaNet · Search lessons