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

Strip the BOM from the source string if it is present #192

Merged
merged 3 commits into from
May 17, 2024

Conversation

JoshLee0915
Copy link
Contributor

While the Yarn Docs say they only accept UTF-8 the examples in the C# repos have yarn files using a UTF-8 with BOM encoding. This does not mess with them as C# will strip the BOM when reading the file as text. Rust though does not do this by default, instead reading it in as a character which causes compilation failures or sometimes panics to occur.

rust-lang/rfcs#2428

This change adds a quick sanitation step when processing the files to strip the BOM from the file if it is present to line the expected behavior up with the core Yarn Spinner lib.

… present to bring it inline with how the C# lib works
@janhohenheim
Copy link
Member

Resolves #191

Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@janhohenheim janhohenheim merged commit 49cc1a2 into YarnSpinnerTool:main May 17, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants