I am trying to save a file using DialogResult and StringBuilder. After making the text, I am calling the following code to save the file:
DialogResult
StringBuilder
setting UTF8 encoding working with Arabic font is the best thing I did:
using (var sw = new StreamWriter( new FileStream(temporaryFilePath, FileMode.Create, FileAccess.ReadWrite), Encoding.UTF8)) { sw.Write(sb.ToString()); } )