Move to the UTF-8 encoding.

This migration is necessary since Lua scripts sources use the UTF-8 encoding while the web browser sees the iso-8859-1 encoding, and this incongruence breaks the visualization of some non-ascii characters.
This commit is contained in:
emanuele-f 2017-05-04 18:56:04 +02:00
parent 1c38df48c9
commit 979fbd74e9
5 changed files with 38 additions and 8 deletions

View file

@ -6,7 +6,8 @@ dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
sendHTTPContentTypeHeader('text/html')
--[[ Note: keep the old iso-8859-1 encoding to avoid breaking existing passwords ]]
sendHTTPContentTypeHeader('text/html', nil, 'iso-8859-1')
if(haveAdminPrivileges()) then
interface.select(ifname)