[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
UTF8 Conversion Functions (ITS#916)
Full_Name: Dave Steck
Version: devel
OS: NT, NetWare
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (137.65.133.65)
LDAPv3 specifies that strings sent or received in the LDAP C API be encoded in
UTF-8 format.
But there are no standard cross-platform APIs for converting local or unicode
strings to UTF-8.
We propose the following functions be added to the OpenLDAP C SDKSDK.
UTF8 to Wide Char
int ldap_x_utf8_to_wc - Convert a single UTF-8 encoded character to a wide
character.
int ldap_x_utf8s_to_wcs - Convert a UTF-8 string to a wide character
string.
int ldap_x_wc_to_utf8 - Convert a single wide character to a UTF-8
sequence.
int ldap_x_wcs_to_utf8s - Convert a wide character string to a UTF-8
string.
UTF8 to Multibyte
ldap_x_mb_to_utf8 - Convert a multi-byte character to a UTF-8 character.
ldap_x_mbs_to_utf8s - Convert a multi-byte string to a UTF-8 string.
ldap_x_utf8_to_mb - Convert a UTF-8 character to a multi-byte character.
ldap_x_utf8s_to_mbs - Convert a UTF-8 string to a multi-byte string.
I'll ftp an implementation of these functions to the OpenLDAP incoming area.
steck001205utfconv.txt - Documentation on the functions.
steck001205utfconv.c - Impementation
steck001205ldap_utf8.h - Include file for the functions.