depe/subversion/subversion/libsvn_fs_fs/fs_fs.c
/* Set *NAME_P to the UTF-8 representation of directory entry NAME.
 * NAME is in the internal encoding used by APR; PARENT is in
 * UTF-8 and in internal (not local) style.
 *
 * Use PARENT only for generating an error string if the conversion
 * fails because NAME could not be represented in UTF-8.  In that
 * case, return a two-level error in which the outer error's message
 * mentions PARENT, but the inner error's message does not mention
 * NAME (except possibly in hex) since NAME may not be printable.
 * Such a compound error at least allows the user to go looking in the
 * right directory for the problem.
 *
 * If there is any other error, just return that error directly.
 *
 * If there is any error, the effect on *NAME_P is undefined.
 *
 * *NAME_P and NAME may refer to the same storage.
 */
Set *NAME_P to the UTF-8 representation of directory entry NAME.
NAME is in the internal encoding used by APR; PARENT is in
UTF-8 and in internal (not local) style.

Use PARENT only for generating an error string if the conversion
fails because NAME could not be represented in UTF-8.  In that
case, return a two-level error in which the outer error's message
mentions PARENT, but the inner error's message does not mention
NAME (except possibly in hex) since NAME may not be printable.
Such a compound error at least allows the user to go looking in the
right directory for the problem.

If there is any other error, just return that error directly.

If there is any error, the effect on *NAME_P is undefined.

*NAME_P and NAME may refer to the same storage.
Set * NAME_P to the UTF - 8 representation of directory entry NAME . NAME is in the internal encoding used by APR ; PARENT is in UTF - 8 and in internal ( not local ) style . Use PARENT only for generating an error string if the conversion fails because NAME could not be represented in UTF - 8 . In that case return a two - level error in which the outer error ' s message mentions PARENT but the inner error ' s message does not mention NAME ( except possibly in hex ) since NAME may not be printable . Such a compound error at least allows the user to go looking in the right directory for the problem . If there is any other error just return that error directly . If there is any error the effect on * NAME_P is undefined . * NAME_P and NAME may refer to the same storage .
static svn_error_t *
entry_name_to_utf8(const char **name_p,
                   const char *name,
                   const char *parent,
                   apr_pool_t *pool)
{
  svn_error_t *err = svn_path_cstring_to_utf8(name_p, name, pool);
  if (err && err->apr_err == APR_EINVAL)
    {
      return svn_error_createf(err->apr_err, err,
                               _("Error converting entry "
                                 "in directory '%s' to UTF-8"),
                               svn_dirent_local_style(parent, pool));
    }
  return err;
}
static svn_error_t * entry_name_to_utf8 ( const char * * name_p , const char * name , const char * parent , apr_pool_t * pool ) { svn_error_t * err = svn_path_cstring_to_utf8 ( name_p , name , pool ) ; if ( err && err -> apr_err == APR_EINVAL ) { return svn_error_createf ( err -> apr_err , err , _ ( " " " " ) , svn_dirent_local_style ( parent , pool ) ) ; } return err ; }
Set *NAME_P to the UTF-8 representation of directory entry NAME.
Set * NAME_P to the UTF - 8 representation of directory entry NAME .