Re: [xml] The issue around LoadLibrary on Windows



On 5/23/2012 12:41, Daniel Veillard wrote:
   C.f. the bug Fix windows unicode build
   https://bugzilla.gnome.org/show_bug.cgi?id=638650

and the previous discussions here:

   http://mail.gnome.org/archives/xml/2008-February/msg00094.html

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.
There's no reason to use a macro, that's true. I don't see any indication that passed name argument is UTF-8 encoded, so I don't see what's a justification of UTF-8 -> WCHAR conversion suggested before. -W version takes WCHAR string (it's always a 2 bytes characters, while AFAIK wchar_t size is implementation defined).

So LoadLibraryA() should work just fine.
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.

Daniel





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