Re: [xml] The issue around LoadLibrary on Windows

On 5/23/2012 14:19, Ralf Junker wrote:
I strongly believe that LoadLibraryW should be used for any Windows
version that supports it.
Of course it should be preferred if you've got choice.

The SQLite OS layer for Win32 shows how this can be done. It converts
UTF-8 to wchar_t* before calling the appropriate function Windows ...W

The code is in the public domain. Here is the link to the current version:
It's not a question how to use MultiByteToWideChar() to do UTF-8 -> WCHAR, the question is does 'name' argument is UTF-8 string or not. By the way, is dlopen() supposed to work on UTF-8 input? I doubt so, and since xmlModuleOpen() has ifdef-ed version for each platform, it makes me think
that LoadLibraryA is a valid solution.


On 23.05.2012 11:41, Daniel Veillard wrote:

   C.f. the bug Fix windows unicode build

and the previous discussions here:

now that the release is done, can we have a final decision on this.
As I understand it, LoadLibraryW takes a wchar_t* parameter, while
internally we are using only a char * (or xmlChar *) so it makes
no sense to try to call LoadLibraryW, and instead of using the
macro LoadLibrary which can only break build, calling LoadLibraryA
seems to be the simplest.
But I'm not a Windows user, and know close to nothing to the platform
so I suggest we reopen that debate, or just agree on fixing this.
xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]