kfogel@tigris.org wrote:
>Modified: trunk/subversion/libsvn_subr/utf.c
>==============================================================================
>--- trunk/subversion/libsvn_subr/utf.c (original)
>+++ trunk/subversion/libsvn_subr/utf.c Thu Jul 18 17:26:40 2002
>@@ -32,13 +32,15 @@
> #include "svn_utf.h"
>
>
>-#ifdef SVN_UTF8
>
> #define SVN_UTF_NTOU_XLATE_HANDLE "svn-utf-ntou-xlate-handle"
> #define SVN_UTF_UTON_XLATE_HANDLE "svn-utf-uton-xlate-handle"
>
> /* Return the apr_xlate handle for converting native characters to UTF-8.
>- Create one if it doesn't exist. */
>+ Create one if it doesn't exist. If unable to find a handle, or
>+ unable to create one because apr_xlate_open returned EINVAL, then
>+ set *RET to null and return SVN_NO_ERROR; if fail for some other
>+ reason, return error. */
> static svn_error_t *
> get_ntou_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool)
> {
>@@ -68,7 +70,13 @@
> /* Try to create one. */
> apr_err = apr_xlate_open (ret, "UTF-8", APR_LOCALE_CHARSET, global_pool);
>
>- if (apr_err != APR_SUCCESS)
>+ /* apr_xlate_open returns EINVAL if no handle could be found. */
>+ if (apr_err == EINVAL)
>
APR_STATUS_IS_EINVAL(apr_err), please.
>+ {
>+ *ret = NULL;
>+ return SVN_NO_ERROR;
>+ }
>+ else if (apr_err != APR_SUCCESS)
> return svn_error_create (apr_err, 0, NULL, pool,
> "failed to create a converter to UTF-8");
>
>@@ -81,7 +89,10 @@
>
>
> /* Return the apr_xlate handle for converting UTF-8 to native characters.
>- Create one if it doesn't exist. */
>+ Create one if it doesn't exist. If unable to find a handle, or
>+ unable to create one because apr_xlate_open returned EINVAL, then
>+ set *RET to null and return SVN_NO_ERROR; if fail for some other
>+ reason, return error. */
> static svn_error_t *
> get_uton_xlate_handle (apr_xlate_t **ret, apr_pool_t *pool)
> {
>@@ -111,6 +122,12 @@
> /* Try to create one. */
> apr_err = apr_xlate_open (ret, APR_LOCALE_CHARSET, "UTF-8", global_pool);
>
>+ /* apr_xlate_open returns EINVAL if no handle could be found. */
>+ if (apr_err == EINVAL)
>
Same here.
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 19 01:00:04 2002