Permalink
Browse files

Fixed BOM issue when combining files

  • Loading branch information...
magnusottosson committed Mar 10, 2012
1 parent e882bbf commit 7e6d863e8eed1e4dca82c34dc6f5d0ec53513164
Showing with 6 additions and 0 deletions.
  1. +6 −0 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)

0 comments on commit 7e6d863

Please sign in to comment.