summaryrefslogtreecommitdiff
path: root/cpp/demo/IceGrid/icebox/HelloI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-05-02 20:24:00 +0200
committerJose <jose@zeroc.com>2014-05-02 20:24:00 +0200
commitb48eab05676ec06380f895d8610f28b4b5831707 (patch)
treeaac05dea0302aca912ca19ddc25886ebca506ce7 /cpp/demo/IceGrid/icebox/HelloI.cpp
parentICE-4851 - Use wstrings for input and output data that contain non-ASCII char... (diff)
downloadice-b48eab05676ec06380f895d8610f28b4b5831707.tar.bz2
ice-b48eab05676ec06380f895d8610f28b4b5831707.tar.xz
ice-b48eab05676ec06380f895d8610f28b4b5831707.zip
Minor fixes to wstringToString usage in demos.
Diffstat (limited to 'cpp/demo/IceGrid/icebox/HelloI.cpp')
-rw-r--r--cpp/demo/IceGrid/icebox/HelloI.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/demo/IceGrid/icebox/HelloI.cpp b/cpp/demo/IceGrid/icebox/HelloI.cpp
index 46b0ea6abf7..1e96d635ba9 100644
--- a/cpp/demo/IceGrid/icebox/HelloI.cpp
+++ b/cpp/demo/IceGrid/icebox/HelloI.cpp
@@ -23,9 +23,9 @@ HelloI::sayHello(const Ice::Current&)
#ifdef _WIN32
vector<wchar_t> buf;
buf.resize(1024);
- DWORD val = GetEnvironmentVariableW(IceUtil::stringToWstring("LANG").c_str(), &buf[0],
- static_cast<DWORD>(buf.size()));
- string lang = (val > 0 && val < buf.size()) ? IceUtil::wstringToString(&buf[0]) : string("en");
+ DWORD val = GetEnvironmentVariableW(L"LANG", &buf[0], static_cast<DWORD>(buf.size()));
+ string lang = (val > 0 && val < buf.size()) ?
+ IceUtil::wnativeToNative(IceUtil::getProcessStringConverter(), 0, &buf[0]) : string("en");
#else
char* val = getenv("LANG");
string lang = val ? string(val) : "en";