Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manifest with byte order mark (BOM) #2031

Closed
andersforsgren opened this issue Oct 7, 2015 · 3 comments
Closed

Allow manifest with byte order mark (BOM) #2031

andersforsgren opened this issue Oct 7, 2015 · 3 comments

Comments

@andersforsgren
Copy link

A cargo .toml file with a byte order mark is a valid UTF-8 encoded file, and should be readable by cargo.

Current behavior (Windows):

failed to parse manifest at `C:\Path\to\Cargo.toml`

Caused by:
  could not parse input as TOML
Cargo.toml:1:1 expected a key but found an empty string

The corresponding issue for the compiler (libsyntax) is rust-lang/rust#12974

cargo --version

cargo 0.4.0-nightly (553b363 2015-08-03) (built 2015-08-03)
@andersforsgren
Copy link
Author

Should this perhaps be handled at the parser level in the toml crate? (https://github.com/alexcrichton/toml-rs)

EDIT: I added a PR at toml-rs/toml-rs#75

@alexcrichton
Copy link
Member

Thanks for the PR @andersforsgren, I release a new version of toml-rs, would you like to send a PR to update the version Cargo is using?

@alexcrichton
Copy link
Member

Ah looks like there's another reason (#2033) to update toml, so I'll just go ahead and do so, thanks again @andersforsgren!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants