[Date Prev][Date Next] [Chronological] [Thread] [Top]

Wide Char to UTF8 Conversion Functions



Have refined the proposed APIs for Wide Char <---> UTF-8 conversions.

int ldap_utf8_to_wc ( wchar_t *wchar, const char *utf8char );
int ldap_utf8s_to_wcs (wchar_t *wcstr, const char *utf8str, size_t count);
int ldap_wc_to_utf8 ( char *utf8char, wchar_t wchar, size_t count);
int ldap_wcs_to_utf8s ( char *utf8str, const wchar_t *wcstr, size_t count );

These APIs will handle 2-byte or 4-byte wchar_t types.

Before we send complete doc and code, please give feedback on:

1,  Are you willing to add these routines and expose the UTF8 utility functions, like ldap_utf8_next?

2.  Is it reasonable to give these function names with "ldap_" prefixes,  or would something else be better?
We would suggest these and the utf8 utility functions all be named something different when exposed,
 like "lstr_".

3.  Would you include these functions in libldap or a separate library?  (Some utf8 utility functions are used internally in libldap.)


Dave Steck   801-861-5219
Novell, Inc., the leading provider of Net services software