java - html umlauts not renderd correctly if progamm executed via jar file -
i have following javacode create html file. use j2html library that:
string html = html( head( meta().attr("charset", "utf-8"), title("test"), link().withrel("stylesheet").withhref("style.css") ), body( h1("räte"), h2("Äpfel") ) ).render(); file file = new file("index.html"); fileutils.writestringtofile(file, html); this works if launch programm via intellij , output:
test
räte
Äpfel
but if create artifact jar , launch it, umlauts aren't displayed correctly. looks this:
test
r�te
�pfel
its same java code , charset set utf-8.
Comments
Post a Comment