Fixed file output where UTF-8 would have a BOM prefixed.

git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@42 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
niel-archer 2011-11-29 13:25:56 +00:00
parent afd285f1e8
commit 2dbe24cc42

View file

@ -2182,7 +2182,15 @@ namespace LSLEditor
enc = Encoding.Default;
break;
}
StreamWriter sw = new StreamWriter(strPath,false, enc);
StreamWriter sw;
if (enc != Encoding.UTF8)
{
sw = new StreamWriter(strPath, false, enc);
}
else
{
sw = new StreamWriter(strPath);
}
sw.Write(this.Text);
sw.Close();
//this.SaveFile(strPath, RichTextBoxStreamType.PlainText);