Last post Nov 17, 2011 08:28 PM by XiaoCheng Fan - MSFT
Nov 16, 2011 05:38 AM|dpb|LINK
ldap_search_sA() function which uses PCHAR as parameter as its input fails when we pass an UTF-8 string containing European characters as filter.
question1) Why does this happen? Is it a issue/bug?
When I convert above filter to wchar_t* & pass it to ldap_search_sW() it works.
question 2) If I use ldap_search_s() from OPENLDAP it works for double byte character although filter is passed as char*. Is this feature not supported by Microsoft?
Example - if I pass user char* user = "gσr", strlen(user) is 4 since σ is taking up 2 bytes
This works with OPENLDAP API which accepts char*
Nov 17, 2011 08:28 PM|XiaoCheng Fan - MSFT|LINK
ldap_search_sA() is used for ANSI, you can try to use ldap_search_sW() for unicode.
For more details:
I hope this can be helpful for you.