Skip to content

Commit

Permalink
Removing BOM strip code that duplicates iconv.decode() handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Turgeon committed Mar 1, 2016
1 parent a8abb9a commit 952fe14
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/grunt/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ file.read = function(filepath, options) {
// string. If no encoding was specified, use the default.
if (options.encoding !== null) {
contents = iconv.decode(contents, options.encoding || file.defaultEncoding, {stripBOM: !file.preserveBOM});
// Strip any BOM that might exist.
if (!file.preserveBOM && contents.charCodeAt(0) === 0xFEFF) {
contents = contents.substring(1);
}
}
grunt.verbose.ok();
return contents;
Expand Down

0 comments on commit 952fe14

Please sign in to comment.