Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

BOM Issue #3

Merged
merged 1 commit into from

2 participants

@permagnus

This fixes issue with BOM when joining files. When joining files the BOM should be removed.

@skroonenburg skroonenburg merged commit 9b3fa36 into from
@skroonenburg

Fantastic! Thanks Magnus for reporting and fixing this issue. I've merged this into the master branch. I'll release a Nuget binary update in the coming week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2012
  1. @permagnus
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 Source/Rejuicer/Rejuicer/Model/PhysicalFileSource.cs
View
6 Source/Rejuicer/Rejuicer/Model/PhysicalFileSource.cs
@@ -86,6 +86,12 @@ public OutputContent GetContent(ICacheProvider cacheProvider, Mode mode)
try
{
var fileBytes = File.ReadAllBytes(PhysicalPath);
+
+ if (fileBytes.Length > 2 && fileBytes[0] == 0xEF && fileBytes[1] == 0xBB && fileBytes[2] == 0xBF)
+ {
+ fileBytes = fileBytes.Skip(3).ToArray();
+ }
+
rejuicedValue = FileTransformationPipeline.TransformInputFile(this, fileBytes);
}
catch (IOException)
Something went wrong with that request. Please try again.