Hello everyone, tell me how to properly save the file so that when you browse the browser there are Russian words, the same code used in its program and NotePad ++, everything is not in Russian, but everything is fine.

I use IE browser

    1 answer 1

    After the <title> </ title> tag, add <meta http-equiv = "Content-Type" content = "text / html; charset = utf-8" /> Copy the text in the richTextBox. At the press of a button did this action

    private void button1_Click(object sender, EventArgs e) { //Write text to file StreamWriter streamwriter = new StreamWriter(@"D:\index.html"); streamwriter.Write(richTextBox1.Text); streamwriter.Close(); //end write text } 

    Everything is stored in the html-file, which normally opens without krakozyabr. But without specifying <meta http-equiv = "Content-Type" content = "text / html; charset = utf-8" /> I also have krakozyabry.