From Farshid Lashkari, "I've attached a small fix so that osgDB::convertStringFromUTF8toCurrentCodePage actually performs the conversion onto the destination string."

This commit is contained in:
Robert Osfield
2010-04-22 16:08:26 +00:00
parent f67942cf03
commit 3f7454fd8c

View File

@@ -149,7 +149,7 @@ std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned
}
std::string sDest(destLen, '\0');
destLen = WideCharToMultiByte(CP_ACP, 0, utf16.c_str(), sourceLength, 0, 0, 0, 0);
destLen = WideCharToMultiByte(CP_ACP, 0, utf16.c_str(), sourceLength, &sDest[0], destLen, 0, 0);
if (destLen <= 0)
{
osg::notify(osg::WARN) << "Cannot convert multi-byte string to UTF-8." << std::endl;