FreeBSD/contrib/subversion/subversion/libsvn_subr/utf8proc.c
/* Fill the given BUFFER with an NFD UCS-4 representation of the UTF-8
 * STRING. If LENGTH is SVN_UTF__UNKNOWN_LENGTH, assume STRING is
 * NUL-terminated; otherwise look only at the first LENGTH bytes in
 * STRING. Upon return, BUFFER->data points at an array of UCS-4
 * characters and *RESULT_LENGTH contains the length of the array.
 *
 * A returned error may indicate that STRING contains invalid UTF-8 or
 * invalid Unicode codepoints. Any error message comes from utf8proc.
 */


A returned error may indicate that STRING contains invalid UTF-8 or
invalid Unicode codepoints. Any error message comes from utf8proc.
A returned error may indicate that STRING contains invalid UTF - 8 or invalid Unicode codepoints . Any error message comes from utf8proc .
static svn_error_t *
decompose_normalized(apr_size_t *result_length,
                     const char *string, apr_size_t length,
                     svn_membuf_t *buffer)
{
  ssize_t result = unicode_decomposition(0, string, length, buffer);
  if (result < 0)
    return svn_error_create(SVN_ERR_UTF8PROC_ERROR, NULL,
                            gettext(utf8proc_errmsg(result)));
  *result_length = result;
  return SVN_NO_ERROR;
}
static svn_error_t * decompose_normalized ( apr_size_t * result_length , const char * string , apr_size_t length , svn_membuf_t * buffer ) { ssize_t result = unicode_decomposition ( 0 , string , length , buffer ) ; if ( result < 0 ) return svn_error_create ( SVN_ERR_UTF8PROC_ERROR , NULL , gettext ( utf8proc_errmsg ( result ) ) ) ; * result_length = result ; return SVN_NO_ERROR ; }
Fill the given BUFFER with an NFD UCS-4 representation of the UTF-8
 STRING.
Fill the given BUFFER with an NFD UCS - 4 representation of the UTF - 8 STRING .