Answer the question
In order to leave comments, you need to log in
C# How to create HTML document with correct encoding?
Hello! I am writing a C# program that generates new html pages. I just create a new file and write the standard tags of a typical html page into it:
<hrml>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
та та та та та
та та та та та
та та та
</body>
</html>
Answer the question
In order to leave comments, you need to log in
File.WriteAllText("index.html", "<h1>привет</h1>", Encoding.UTF8);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question