summaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_subr/utf.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2013-07-28 05:04:41 +0000
committerpeter <peter@FreeBSD.org>2013-07-28 05:04:41 +0000
commit3b9f7e96381479fb03ae2c36d490a38718f71083 (patch)
treea851d66ec0c51a7321b30a677a0e55f1655af4d6 /subversion/libsvn_subr/utf.c
parent6879a90da0ad9b5e74fc212c899751fe3821ac7b (diff)
downloadFreeBSD-src-3b9f7e96381479fb03ae2c36d490a38718f71083.zip
FreeBSD-src-3b9f7e96381479fb03ae2c36d490a38718f71083.tar.gz
Import subversion-1.8.1 into vendor staging area.
Diffstat (limited to 'subversion/libsvn_subr/utf.c')
-rw-r--r--subversion/libsvn_subr/utf.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/subversion/libsvn_subr/utf.c b/subversion/libsvn_subr/utf.c
index 355e068..535e3da 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. */
OpenPOWER on IntegriCloud