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:
parent
afd285f1e8
commit
2dbe24cc42
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue