From 9d370f63e8af4e9787fa5c395b1d11d4838ed762 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 3 Sep 2011 18:19:43 +0000 Subject: [PATCH] Reverted Script Unicode fix in r928 as it causes some problems with ANSI encoded files. --- Library/MeasureScript.cpp | 2 +- Library/lua/LuaManager.cpp | 4 ++-- Library/lua/LuaScript.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/MeasureScript.cpp b/Library/MeasureScript.cpp index 6a45697a..a1e35d19 100644 --- a/Library/MeasureScript.cpp +++ b/Library/MeasureScript.cpp @@ -232,7 +232,7 @@ void CMeasureScript::ReadConfig(CConfigParser& parser, const WCHAR* section) */ void CMeasureScript::ExecuteBang(const WCHAR* args) { - std::string str = ConvertToUTF8(args); + std::string str = ConvertToAscii(args); m_LuaScript->RunString(str.c_str()); } diff --git a/Library/lua/LuaManager.cpp b/Library/lua/LuaManager.cpp index cfaf5cd4..5464a52f 100644 --- a/Library/lua/LuaManager.cpp +++ b/Library/lua/LuaManager.cpp @@ -109,10 +109,10 @@ void LuaManager::LuaLog(int nLevel, const char* format, ... ) void LuaManager::PushWide(lua_State* L, const WCHAR* str) { - lua_pushstring(L, ConvertToUTF8(str).c_str()); + lua_pushstring(L, ConvertToAscii(str).c_str()); } std::wstring LuaManager::ToWide(lua_State* L, int narg) { - return ConvertUTF8ToWide(lua_tostring(L, narg)); + return ConvertToWide(lua_tostring(L, narg)); } diff --git a/Library/lua/LuaScript.cpp b/Library/lua/LuaScript.cpp index 90e9d071..3e929f27 100644 --- a/Library/lua/LuaScript.cpp +++ b/Library/lua/LuaScript.cpp @@ -176,7 +176,7 @@ int LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, std else if (type == LUA_TSTRING) { const char* str = lua_tostring(m_State, -1); - strValue = ConvertUTF8ToWide(str); + strValue = ConvertToWide(str); numValue = strtod(str, NULL); }