@@ -23,12 +23,13 @@ #ifdef HAVE_DLFCN_H # include #endif #import "OFPlugin.h" -#import "OFString.h" #import "OFLocale.h" +#import "OFString.h" +#import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFLoadPluginFailedException.h" typedef OFPlugin *(*init_plugin_t)(void); @@ -40,11 +41,15 @@ return dlopen([path cStringWithEncoding: [OFLocale encoding]], flags); #else if (path == nil) return GetModuleHandle(NULL); - return LoadLibraryW(path.UTF16String); + if ([OFSystemInfo isWindowsNT]) + return LoadLibraryW(path.UTF16String); + else + return LoadLibraryA( + [path cStringWithEncoding: [OFLocale encoding]]); #endif } void * of_dlsym(of_plugin_handle_t handle, const char *symbol)