Adds UTF-8 support for JavaScript files.

This was SVN commit r11750.
This commit is contained in:
historic_bruno
2012-05-04 21:48:46 +00:00
parent a5713c1264
commit 32d2927449
11 changed files with 26 additions and 31 deletions
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -132,7 +132,6 @@ void ScriptTestSetup(ScriptInterface& ifc)
std::ifstream ifs(OsString(path).c_str());
ENSURE(ifs.good());
std::string content((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
std::wstring wcontent(content.begin(), content.end());
bool ok = ifc.LoadScript(L"test_setup.js", wcontent);
bool ok = ifc.LoadScript(L"test_setup.js", content);
ENSURE(ok);
}