summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-05-28 12:35:38 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-05-28 12:35:38 -0700
commitb101fbdf0d8b1153f7bea58bc97e773e1016b7cc (patch)
treecb1918f0e3f7ae34ffc786e9806c9084445d3d16 /src
parentaf7272b5d86a353809256e533802c66110ff2510 (diff)
Use Unicode under windows.
Diffstat (limited to 'src')
-rw-r--r--src/BLua.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/BLua.cc b/src/BLua.cc
index fa519a9..b111218 100644
--- a/src/BLua.cc
+++ b/src/BLua.cc
@@ -173,7 +173,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", "UNICODE");
+ String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE");
if (GetEnvironmentVariable((wchar_t *)varStr.to_charp(), wbuffer, BUFSIZ)) {
char buffer[BUFSIZ + 1];
const wchar_t * pwbuffer = wbuffer;
@@ -215,8 +215,8 @@ int Balau::LuaStatics::setenv(lua_State * __L) {
#ifdef _WIN32
#ifdef UNICODE
- String varStr = L.tostring(1).iconv("UTF-8", "UNICODE");
- String valStr = L.tostring(2).iconv("UTF-8", "UNICODE");
+ String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE");
+ String valStr = L.tostring(2).iconv("UTF-8", "UNICODELITTLE");
SetEnvironmentVariable((wchar_t *)varStr.to_charp(), (wchar_t *)valStr.to_charp());
#else
SetEnvironmentVariable(L.tostring(1).to_charp(), L.tostring(2).to_charp());
@@ -237,7 +237,7 @@ int Balau::LuaStatics::unsetenv(lua_State * __L) {
#ifdef _WIN32
#ifdef UNICODE
- String varStr = L.tostring(1).iconv("UTF-8", "UNICODE");
+ String varStr = L.tostring(1).iconv("UTF-8", "UNICODELITTLE");
SetEnvironmentVariable((wchar_t *)varStr.to_charp(), NULL);
#else
SetEnvironmentVariable(L.tostring(1).to_charp(), NULL);