Fixed file output where UTF-8 would have a BOM prefixed.
This commit is contained in:
parent
6e07a27ddf
commit
9828d0bc23
1 changed files with 9 additions and 1 deletions
|
@ -2182,7 +2182,15 @@ namespace LSLEditor
|
||||||
enc = Encoding.Default;
|
enc = Encoding.Default;
|
||||||
break;
|
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.Write(this.Text);
|
||||||
sw.Close();
|
sw.Close();
|
||||||
//this.SaveFile(strPath, RichTextBoxStreamType.PlainText);
|
//this.SaveFile(strPath, RichTextBoxStreamType.PlainText);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue