opened
hanyuwei70
username_0
When the BOM is presented in the input stream, `String` object should strip it and do not output BOM.
std::string::String should strip UTF BOM
issue
created
alexcrichton
username_1
I would agree, yeah, that this is likely an RFC topic rather than an issue or a PR
comment
created
SimonSapin
username_2
It’s not clear what is being proposed. Which APIs exactly should strip?

And more importantly, why? I tend to think of these standard library API as low-level primitives, and feel that BOM removal would tend to belong more in a higher library that might for example also support multiple encodings and detect the presence of a BOM to help pick one. And even then, maybe not always. https://docs.rs/encoding_rs/0.7.2/encoding_rs/struct.Decoder.html#impl has different methods for different use cases, only some of them remove a BOM.
comment
created
BurntSushi
username_3
I also agree this requires an RFC and side with @username_2 on this. I think we would need exceptional motivation to do this.
comment
closed
steveklabnik
username_4
issue
created
steveklabnik
username_4
Thanks all! @username_0 please pursue one of them if you think you can address these comments: https://github.com/rust-lang/rfcs
comment