PistonDevelopers / VisualRust

Visual Studio extension for Rust
MIT License
703 stars 72 forks source link

Get rid of BOM in templates (if possible) #259

Closed Boddlnagg closed 7 years ago

Boddlnagg commented 8 years ago

Currently the .rs and Cargo.toml files in the templates use a BOM to make VS use UTF-8 encoding. Using a BOM is generally discouraged, and I would like to get rid of it, but VS must still use UTF-8 for these files.

briansmith commented 8 years ago

I believe the extension "just" needs to make sure every *.rs file's encoding is set to UTF-8 in the pre-save event. There's an extension that already does this in a more general sense at https://vlasovstudio.com/fix-file-encoding/, so it definitely seems possible.

Note in particular that UTF-8 is the only legal encoding of Rust source files, according to the Rust reference, so there's no need to have any fancy configuration options or anything to control this.

Boddlnagg commented 7 years ago

I think this was fixed by #260.