As the title says... Chat on...

User avatar
By ozayturay
#8797
Code: Select allsrv = net.createServer(net.TCP)
srv:listen(80, function(conn)
  conn:on("receive", function(client)
    client:send('<html><head><title>ESP8266</title>')
    client:send('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />')
    client:send('</head><body>çöşığüÇÖŞİĞÜ</body></html>')
    client:close()
    collectgarbage()
  end)
end)


I simplified the code down to this and replicated the problem. The HTML code is served as ANSI (I use NotePad++ for source viewer in IE and it shows ANSI) instead of UTF-8 by the lua server, so I cannot display characters specific to my locale. What can I do to make lua serve pages as UTF-8?