I use Jsoup library.
After the execution of the following code:
Document doc = new Document(language);
File input = new File("filePath" + "filename.html");
PrintWriter writer = new PrintWriter(input, "UTF-8");
String contentType = "<%@ page contentType=\"text/html; charset=UTF-8\" %>";
doc.appendText(contentType);
writer.write(doc.toString());
writer.flush();
writer.close();
In the output html file I receive the following line of text:
<%@ page contentType="text/html; charset=UTF-8" %>
instead of
<%@ page contentType="text/html; charset=UTF-8" %>
What could be the problem?