Skip to content

Commit a63a41c

Browse files
committed
Use default encoding when substituting code via the file
1 parent 88ab764 commit a63a41c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rubberduck.VBEEditor/SourceCodeHandling/SourceFileHandlerComponentSourceCodeHandlerAdapter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.IO;
2+
using System.Text;
23
using Rubberduck.VBEditor.SafeComWrappers;
34
using Rubberduck.VBEditor.SafeComWrappers.Abstract;
45

@@ -31,7 +32,7 @@ public IVBComponent SubstituteCode(IVBComponent module, string newCode)
3132
{
3233
return module;
3334
}
34-
File.WriteAllText(fileName, newCode);
35+
File.WriteAllText(fileName, newCode, Encoding.Default);
3536
return _tempSourceFileHandler.ImportAndCleanUp(module, fileName);
3637
}
3738
}

0 commit comments

Comments
 (0)