Platform SDK: Active Directory, ADSI, and Directory Services

LdapUnicodeToUTF8

Modules that don't have the UTF-8 code page can call the LdapUnicodeToUTF8 function to convert Unicode strings to UTF-8.

int LdapUnicodeToUTF8(
  LPCWSTR lpSrcStr,
  int cchSrc,
  LPSTR lpDestStr,
  int cchDest
);

Parameters

lpSrcStr
[in] The Unicode string to convert.
cchSrc
[in] The number of characters in a source string.
lpDestStr
[out] The converted UTF-8 character string.
cchDest
[in] The number of characters converted.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Winldap.h.
  Library: Use Wldap32.lib.

See Also

Functions