Menu

#1207 libcurl compilation on Windows with unicode support enabled.

closed-wont-fix
None
4
2013-06-21
2013-03-18
No

libcurl ldap.c fails to compile properly on Windows when Unicode support is enabled. See attached patch; basically WIN32 API functions should be suffixed by 'A' to use 'char' implementations rather than 'wchar' implementations.

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2013-03-18

    Forgot to mention version; I downloaded curl 7.29.0.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-01
    • assigned_to: Daniel Stenberg
    • milestone: --> not_used
    • priority: 7 --> 4
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-01

    Please clarify why we would want this patch and the advantages this change has to us or to users of libcurl.

     
  • Anonymous

    Anonymous - 2013-04-03

    This patch does not bring any changes to users; it only helps developers who happens to build libcurl with unicode support enabled.

    The patch replaces calls to ldap_init() win32 macro (which is equal to function ldap_initA() or ldap_initW() depending on the compilation options) by calls to ldap_initA().

    This A/W function mecanism is well explained on this page : http://msdn.microsoft.com/en-us/library/windows/desktop/dd317766(v=vs.85).aspx

    Feel free to include it or reject it.

     
  • Christian Hägele

    My 2 cents:
    You could get advantages for users if unicode should be supported for username and password. It looks like a similar issue like there was with NTLM proxy authentication some while ago.
    The solution there was to use the ANSI-Version when UNICODE was not defined and use the Unicode-Version of the Windows-function when UNICODE was defined. In the Unicode case you treat username and other strings as UTF8 encoded and these strings get translated into wchar_t* for the call of the Windows-function. (curl_multibyte.h provides these functions)

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-05-21

    Can someone clarify if this patch has any downside? It seems so very unconditional in that it switches other API calls in many places. For example, which windows versions does it work on and does it impose any requirements on the compiler/build environment?

    I will close this report unless I see a significant support and will to get it merged.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-05-26
    • status: open --> pending
     
  • Anonymous

    Anonymous - 2013-05-28

    See commit https://github.com/bagder/curl/commit/46480bb9a1569eaf156012f33e3e7e8c3de18f87, file getenv.c, where 'ExpandEnvironmentString' was replaced by 'ExpandEnvironmentStringA'.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-05-28

    Sorry, I don't understand what you're saying with that link. Please clarify what the benefits of your suggested patch is, and the possible downsides it has. As I already asked for above. Just handing me a link to our own source code does not answer these questions.

     
  • Anonymous

    Anonymous - 2013-05-28

    In fact, it seems that ldap support may be enabled on Linux using './configuration --enable-ldap' and that the ldap library to use may also be chosen on the configure command line.

    In that case, I can not test all configuration options, so the patch should be dropped.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-06-04
    • status: pending --> closed-wont-fix
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-06-04

    No convincing information provided, closing. Will re-open if someone can explain this better to me.

     
MongoDB Logo MongoDB