diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/BLua.cc | 8 | ||||
-rw-r--r-- | src/MMap.cc | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/BLua.cc b/src/BLua.cc index 5b3df8b..734f024 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -175,7 +175,7 @@ int Balau::LuaStatics::getenv(lua_State * __L) { #ifdef _WIN32 #ifdef UNICODE wchar_t wbuffer[BUFSIZ + 1]; - String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE"); + String varStr = L.tostring(1).iconv("UTF-8", "CP1200"); if (GetEnvironmentVariable((wchar_t *)varStr.to_charp(), wbuffer, BUFSIZ)) { char buffer[BUFSIZ + 1]; const wchar_t * pwbuffer = wbuffer; @@ -217,8 +217,8 @@ int Balau::LuaStatics::setenv(lua_State * __L) { #ifdef _WIN32 #ifdef UNICODE - String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE"); - String valStr = L.tostring(2).iconv("UTF-8", "UNICODELITTLE"); + String varStr = L.tostring(1).iconv("UTF-8", "CP1200"); + String valStr = L.tostring(2).iconv("UTF-8", "CP1200"); SetEnvironmentVariable((wchar_t *)varStr.to_charp(), (wchar_t *)valStr.to_charp()); #else SetEnvironmentVariable(L.tostring(1).to_charp(), L.tostring(2).to_charp()); @@ -239,7 +239,7 @@ int Balau::LuaStatics::unsetenv(lua_State * __L) { #ifdef _WIN32 #ifdef UNICODE - String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE"); + String varStr = L.tostring(1).iconv("UTF-8", "CP1200"); SetEnvironmentVariable((wchar_t *)varStr.to_charp(), NULL); #else SetEnvironmentVariable(L.tostring(1).to_charp(), NULL); diff --git a/src/MMap.cc b/src/MMap.cc index a984f00..4c3c3a4 100644 --- a/src/MMap.cc +++ b/src/MMap.cc @@ -21,7 +21,7 @@ class MMapPlatform { size_t s = 0; TCHAR * fnameTchar; #ifdef UNICODE - fname.do_iconv("UTF-8", "UNICODELITTLE"); + fname.do_iconv("UTF-8", "CP1200"); fnameTchar = (TCHAR *) alloca(fname.strlen() + 2); memset(fnameTchar, 0, fname.strlen() + 2); memcpy(fnameTchar, fname.to_charp(), fname.strlen()); |