U4-5981 Umbraco 7.2 Text encoding when saving partial view template
#U4-5981 In Progress Assignee Shandem
This commit is contained in:
@@ -100,8 +100,19 @@ namespace Umbraco.Core.IO
|
||||
if (stream.CanSeek)
|
||||
stream.Seek(0, 0);
|
||||
|
||||
using (var destination = (Stream)File.Create(GetFullPath(fsRelativePath)))
|
||||
stream.CopyTo(destination);
|
||||
using (var memoryStream = new MemoryStream())
|
||||
{
|
||||
//Add the BOM
|
||||
var bom = new byte[] { 0xEF, 0xBB, 0xBF };
|
||||
memoryStream.Write(bom, 0, bom.Length);
|
||||
stream.CopyTo(memoryStream);
|
||||
|
||||
if (memoryStream.CanSeek)
|
||||
memoryStream.Seek(0, 0);
|
||||
|
||||
using (var destination = (Stream)File.Create(GetFullPath(fsRelativePath)))
|
||||
memoryStream.CopyTo(destination);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetFiles(string path)
|
||||
|
||||
Reference in New Issue
Block a user