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

Prefixing unicode byte order marks are stripped from included files #62

Merged
merged 1 commit into from
May 20, 2016

Conversation

dhedey
Copy link
Contributor

@dhedey dhedey commented Apr 30, 2016

Some tools (particularly those on Windows - in particular, Visual Studio defaults to this behaviour) have a habit of saving unicode byte order marks (BOMs) at the start of all UTF-8 files (despite these not being necessary). These should be trimmed before being included. See nodejs/node-v0.x-archive#1918 for details concerning this.

An example of the bug is below (note that \ufeff is an example of a unicode BOM)

file1.html:
\ufeff This is some text.

file2.html:
\ufeff Some text here

Results in file 1 reading:
This is some text.
 Some text here

This occurs because BOMs should not occur in the middle of files (only at their starts)

@wiledal wiledal merged commit 4423127 into wiledal:master May 20, 2016
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