Fixed a bunch more encoding issues.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3358 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-12-22 17:38:21 +00:00
parent 937e32fb99
commit 5c855afbb3
10 changed files with 3412 additions and 725 deletions

View File

@ -16,7 +16,7 @@ File.makeDirectory("data/auth/db");
var gDatabase = new Database("data/auth/db");
try {
gAccounts = JSON.parse(File.readFile(kAccountsFile));
gAccounts = JSON.parse(new TextDecoder("UTF-8").decode(File.readFile(kAccountsFile)));
} catch (error) {
}
@ -131,7 +131,7 @@ function authHandler(request, response) {
response.writeHead(303, {"Location": formData.return, "Set-Cookie": cookie});
response.end();
} else {
var html = File.readFile("core/auth.html");
var html = new TextDecoder("UTF-8").decode(File.readFile("core/auth.html"));
var contents = "";
if (entry) {