summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-10 02:56:41 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-10 02:56:41 -0700
commitf4ebd392a866eca569e78a7e9c3d61b3422b3428 (patch)
treea545f863a674ea47214b7a51afb44835bfe59e6e
parent3d077e536e9fae7c292e9ab7c1e76e64076723f1 (diff)
Fixing iconv usage after changing over to win32-iconv.
-rw-r--r--src/BLua.cc8
-rw-r--r--src/MMap.cc2
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());