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

This commit is contained in:
unknown 2011-11-29 12:54:27 +00:00
parent 6e07a27ddf
commit 9828d0bc23

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);