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

@ -146,7 +146,7 @@ v8::Handle<v8::String> Task::loadFile(v8::Isolate* isolate, const char* fileName
char* buffer = new char[fileSize];
file.read(buffer, fileSize);
std::string contents(buffer, buffer + fileSize);
value = v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>(buffer), v8::String::kNormalString, fileSize);
value = v8::String::NewFromUtf8(isolate, buffer, v8::String::kNormalString, fileSize);
delete[] buffer;
}
return value;