diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2013-07-28 05:04:41 +0000 | 
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2013-07-28 05:04:41 +0000 | 
| commit | 97551b2898eb459e9b616947d87d026d27b61518 (patch) | |
| tree | a851d66ec0c51a7321b30a677a0e55f1655af4d6 /subversion/libsvn_subr/utf.c | |
| parent | fec88c40a7bace625f49c3234a71560a161ee0ef (diff) | |
Notes
Diffstat (limited to 'subversion/libsvn_subr/utf.c')
| -rw-r--r-- | subversion/libsvn_subr/utf.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/subversion/libsvn_subr/utf.c b/subversion/libsvn_subr/utf.c index 355e068f5e55..535e3daf9f5c 100644 --- a/subversion/libsvn_subr/utf.c +++ b/subversion/libsvn_subr/utf.c @@ -233,6 +233,8 @@ xlate_alloc_handle(xlate_handle_node_t **ret,    else if (apr_err != APR_SUCCESS)      {        const char *errstr; +      char apr_strerr[512]; +        /* Can't use svn_error_wrap_apr here because it calls functions in           this file, leading to infinite recursion. */        if (frompage == SVN_APR_LOCALE_CHARSET) @@ -248,7 +250,13 @@ xlate_alloc_handle(xlate_handle_node_t **ret,                                _("Can't create a character converter from "                                  "'%s' to '%s'"), frompage, topage); -      return svn_error_create(apr_err, NULL, errstr); +      /* Just put the error on the stack, since svn_error_create duplicates it +         later.  APR_STRERR will be in the local encoding, not in UTF-8, though. +       */ +      svn_strerror(apr_err, apr_strerr, sizeof(apr_strerr)); +      return svn_error_create(apr_err,  +                              svn_error_create(apr_err, NULL, apr_strerr), +                              errstr);      }    /* Allocate and initialize the node. */  | 
