mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
be3d1eb301
Suggest character encoding is incorrect when encountering random null bytes This adds a note whenever null bytes are seen at the start of a token unexpectedly, since those tend to come from UTF-16 encoded files without a [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) (if a UTF-16 BOM appears it won't be valid UTF-8, but if there is no BOM it be both valid UTF-16 and valid but garbled UTF-8). This approach was suggested in https://github.com/rust-lang/rust/issues/73979#issuecomment-653976451. Closes #73979. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |