[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

mod_dav_svn SVNUseUTF8 option not working

From: Dmitry Bakshaev <dab18_at_izhnet.ru>
Date: Thu, 25 Oct 2018 22:27:22 +0400

my subversion server is apache-2.4.34/event-MPM and
subversion-1.9.7/mod_dav_svn

configuration based on example from
https://subversion.apache.org/docs/release-notes/1.8.html#hooks

cat httpd.conf:
SVNHooksEnv /etc/subversion/svnserve.conf
SVNUseUTF8 On #not "yes" as example say

cat /etc/subversion/svnserve.conf:
[default]
LANG = ru_RU.UTF-8

cat pre-commit:
#!/bin/sh
echo "Привет" >&2

pre-commit hook failed with message:
[Error output could not be translated from the native
locale to UTF-8.]

this bug is https://issues.apache.org/jira/browse/SVN-2487
related.

after some tracing of mod_dav_svn i find
call to svn_utf_initialize2() from init()
always does with conf->use_utf8=0.

adding svn_utf_initialize2() to merge_server_config()
fixes the problem.

patch attached.

--- subversion/mod_dav_svn/mod_dav_svn.c.orig<->2018-10-25
16:44:12.388287364 +0400
+++ subversion/mod_dav_svn/mod_dav_svn.c<------>2018-10-25
16:43:55.958287555 +0400
@@ -231,6 +231,8 @@
        newconf->compression_level =
child->compression_level;
      }
.
+ newconf->use_utf8 = INHERIT_VALUE(parent, child,
use_utf8);
+ svn_utf_initialize2(newconf->use_utf8, p);
    return newconf;
  }
.
Received on 2018-10-26 07:26:36 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.