Re: [xml] The issue around LoadLibrary on Windows
- From: Nikolay Sivov <bunglehead gmail com>
- To: xml gnome org
- Subject: Re: [xml] The issue around LoadLibrary on Windows
- Date: Wed, 23 May 2012 15:26:01 +0300
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
functions.
The code is in the public domain. Here is the link to the current version:
http://www.sqlite.org/src/artifact/37e1b92f0fa5edf1955bcd6b04d3e4d8be68ede2
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.
Ralf
On 23.05.2012 11: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.
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 http://xmlsoft.org/
xml gnome org
https://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]