We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67fb32f commit 4a460f1Copy full SHA for 4a460f1
src/WebJobs.Script/Description/DotNet/CSharp/CSharpCompilationService.cs
@@ -63,10 +63,12 @@ private static string GetFunctionSource(FunctionMetadata functionMetadata)
63
64
if (File.Exists(functionMetadata.ScriptFile))
65
{
66
- code = File.ReadAllText(functionMetadata.ScriptFile);
+ // We use ReadAllBytes here to make sure we preserve the BOM, if present.
67
+ var codeBytes = File.ReadAllBytes(functionMetadata.ScriptFile);
68
+ code = Encoding.UTF8.GetString(codeBytes);
69
}
70
- return Utility.RemoveUtf8ByteOrderMark(code ?? string.Empty);
71
+ return code ?? string.Empty;
72
73
74
private Compilation GetScriptCompilation(Script<object> script, FunctionMetadata functionMetadata)
0 commit comments