From c3b9419e05ac606f616b24b91a0abdfd098f890c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Jun 2010 11:03:23 +0000 Subject: [PATCH] From Farshid Lashkari, "I've made a small modification to osgDB::DynamicLibrary so it can load UTF-8 filenames on Windows." --- src/osgDB/DynamicLibrary.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osgDB/DynamicLibrary.cpp b/src/osgDB/DynamicLibrary.cpp index 7154fa24f..c9b2be708 100644 --- a/src/osgDB/DynamicLibrary.cpp +++ b/src/osgDB/DynamicLibrary.cpp @@ -43,6 +43,7 @@ #include #include #include +#include using namespace osgDB; @@ -93,7 +94,11 @@ DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string& libr HANDLE handle = NULL; #if defined(WIN32) && !defined(__CYGWIN__) +#ifdef OSG_USE_UTF8_FILENAME + handle = LoadLibraryW( convertUTF8toUTF16(libraryName).c_str() ); +#else handle = LoadLibrary( libraryName.c_str() ); +#endif #elif defined(__APPLE__) && defined(APPLE_PRE_10_3) NSObjectFileImage image; // NSModule os_handle = NULL;