On Thu, Oct 25, 2018 at 10:27:22PM +0400, Dmitry Bakshaev wrote: > 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
While this will work, svnserve.conf isn't a good place for setting hook script environment variables because this path is the configuration file of the 'svnserve' program. I'd suggest using a different path, such as '/etc/subversion/hooks-env'. > 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; > } > . Thanks, committed in https://svn.apache.org/r1844882 and nominated for backport to 1.10.x.
