I'd like to create an HTML file from a
String, such as
"abcdéèçàdefghijk". I tried different methods with no success. For example,
s = OpenWrite["test1.html", CharacterEncoding -> "ASCII"]; WriteString[s, "abcdéèçàdefghijk"] Close[s]
returns a file with
I managed to achieve my goal by specifying the encoding in the html file (
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> together with
s = OpenWrite["test1.html", CharacterEncoding -> "UTF8"]) but I am curious how this could be done from MMA encoding features.