From 3b9f7e96381479fb03ae2c36d490a38718f71083 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 28 Jul 2013 05:04:41 +0000 Subject: Import subversion-1.8.1 into vendor staging area. --- subversion/libsvn_subr/utf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'subversion/libsvn_subr/utf.c') 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. */ -- cgit v1.1