Skip to content

Loading…

BOM Issue #3

Merged
merged 1 commit into from

2 participants

@magnusottosson

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

@skroonenburg skroonenburg merged commit 9b3fa36 into skroonenburg:master
@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. @magnusottosson
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.