From: Howard Chu Date: Tue, 30 Apr 2002 13:57:24 +0000 (+0000) Subject: Added ldap_ucs_to_utf8s to convert ASN.1 T61STRING, BMPSTRING, and X-Git-Tag: OPENLDAP_REL_ENG_2_MP~136 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f5fd4dc3557e88a3b3001f5cc595420b27574091;p=openldap Added ldap_ucs_to_utf8s to convert ASN.1 T61STRING, BMPSTRING, and UNIVERSALSTRING to UTF-8 format. --- diff --git a/include/ldap_pvt_uc.h b/include/ldap_pvt_uc.h index 6a2e4af264..521713ddc4 100644 --- a/include/ldap_pvt_uc.h +++ b/include/ldap_pvt_uc.h @@ -39,6 +39,11 @@ typedef unsigned long ldap_unicode_t; #define ldap_utf8_to_unicode( p ) ldap_utf8_to_ucs4((p)) #define ldap_unicode_to_utf8( c, buf ) ldap_ucs4_to_ucs4((c),(buf)) +/* Convert a string with csize octets per character to UTF-8 */ +LDAP_F( int ) ldap_ucs_to_utf8s LDAP_P(( + struct berval *ucs, int csize, struct berval *utf8s )); + + /* returns the number of bytes in the UTF-8 string */ LDAP_F (ber_len_t) ldap_utf8_bytes( const char * ); /* returns the number of UTF-8 characters in the string */