/* $OpenLDAP$ */
/*
- * Copyright 2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 2000-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
necessary from being decoded.
*/
-/*------------------------------------------------------------------------------
+/*-----------------------------------------------------------------------------
Convert a UTF-8 character to a wide char.
Return the length of the UTF-8 input character in bytes.
*/
utf8char = "";
/* Get UTF-8 sequence length from 1st byte */
- utflen = UTF8_CHARLEN(utf8char);
+ utflen = LDAP_UTF8_CHARLEN(utf8char);
if( utflen==0 || utflen > LDAP_MAX_UTF8_LEN )
return -1; /* Invalid input */
while ( *utf8str && (wcstr==NULL || wclen<count) )
{
/* Get UTF-8 sequence length from 1st byte */
- utflen = UTF8_CHARLEN(utf8str);
+ utflen = LDAP_UTF8_CHARLEN(utf8str);
if( utflen==0 || utflen > LDAP_MAX_UTF8_LEN )
return -1; /* Invalid input */
}
-/*------------------------------------------------------------------------------
+/*-----------------------------------------------------------------------------
Convert one wide char to a UTF-8 character.
Return the length of the converted UTF-8 character in bytes.
No more than 'count' bytes will be written to the output buffer.