Re: [xml] The issue around LoadLibrary on Windows

On 5/23/2012 14:44, Ralf Junker wrote:
On 23.05.2012 14:26, Nikolay Sivov wrote:

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.
Daniel mentioned xmlChar* in his original message and, AFAIK, xmlChar*
is supposed to hold UTF-8 strings just as libxml uses UTF-8 internally.

If this is true, neither LoadLibraryA nor LoadLibraryW work for any
characters outside the ASCII range.
How it's possible to use utf-8 for xmlModulePlatrfomOpen() as long as it ends up
calling dlopen() or shl_load() for example?

The goal is to resolve windows build issue, not to change the way it works on other platforms
by changing interface to utf-8 file names.
I see that xsltExtModuleRegisterDynamic(const xmlChar * URI) uses
xmlChar so I suppose this is UTF-8. At last it calls
xmlModulePlatformOpen() but does not apply character conversion. To me
this seems inconsistent.
Well, this is irrelevant to initial problem, looks inconsistent, that's right - and should be addressed
separately in libxslt.

I also support LoadLibraryW because otherwise it is not possible for
Windows to load extensions with Unicode character names outside the
system locale.


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