中文编码错误,Error output could not be translated from the native locale to UTF-8.

假如使用http访问仓库,用户配置的pre-commit钩子里面如果有中文,可能会出现“Error output could not be translated from the native locale to UTF-8.”的错误提示
用户如果使用svnserver访问仓库,钩子不会有问题。
导致这个错误的原因是因为http服务本身有一个编码的设置,所以如果http的编码没有设置好,钩子返回的中文就会导致编码错误,具体解决方法如下:
修改/etc/httpd/conf/httpd.conf文件
vim /etc/httpd/conf/httpd.conf
往文件中添加内容:

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
SVNUseUTF8 On
</IfModule>

保存

service httpd restart

参考博客:http://www.cnblogs.com/lavezhang/p/7219398.html

原文地址:https://www.cnblogs.com/mrnx2004/p/10785277.html