fix BOM header 0xFEFF problem for ucs2 encoding file #146

Merged
merged 1 commit into from Dec 29, 2013

Conversation

Projects
None yet
2 participants
@kiinoo
Contributor

kiinoo commented Dec 26, 2013

···if (this.lines === 0 && this.options.encoding === 'utf8' && 0xFEFF === chars.charCodeAt(0)) ···
changed to
···if (this.lines === 0 && 0xFEFF === chars.charCodeAt(0)) ···

The reason is that not only 'utf8' has BOM headers, but also some other encodings, such as 'ucs2'.
so I suggest remove the BOMM header directly.

wdavidw added a commit that referenced this pull request Dec 29, 2013

Merge pull request #146 from kiinoo/master
fix BOM header 0xFEFF problem for ucs2 encoding file

@wdavidw wdavidw merged commit 15aa4ce into adaltas:master Dec 29, 2013

1 check passed

default The Travis CI build passed
Details
@wdavidw

This comment has been minimized.

Show comment
Hide comment
@wdavidw

wdavidw Dec 29, 2013

Collaborator

Thanks

Collaborator

wdavidw commented Dec 29, 2013

Thanks

wdavidw added a commit that referenced this pull request Dec 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment