SVN从Windows迁移到linux在搭建好环境后,中文名字的仓库无法通过http访问命令行测试正常svn co svn://xx.xx.xx.xx/测试但是通过http就不行svn co http://xx.xx.xx.xx/测试查看Apache 错误日志发现错误 (20014)Int...

SVN从Windows迁移到linux
在搭建好环境后,中文名字的仓库无法通过http访问
命令行测试正常
svn co svn://xx.xx.xx.xx/测试
但是通过http就不行
svn co http://xx.xx.xx.xx/测试
查看Apache 错误日志
发现错误
(20014)Internal error (specific information not available): Can‘t convert string from ‘UTF-8‘ to native encoding:
(20014)Internal error (specific information not available): /webapp/svndata/?\\230?\\150?\\135?\\228?\\187?\\182?\\230?\\136?\\150?\\231?\\155?\\174?\\229?\\189?\\149/format
无法将中文UTF-8转码
有人说是 错误数字都不大于255,应该是ASCII编码只转了7位,高位的丢失了。
搜索了N多解决方案都不行,还以为是个BUG
最后在官网找到答案
http://svnbook.red-bean.com/en/1.8/svn.serverconfig.httpd.html#svn.serverconfig.httpd.ref.mod_dav_svn
-
SVNUseUTF8 On|Off
-
When set to
On
, mod_dav_svn will communicate with hook scripts using repository root paths encoded in UTF-8, and will expect those scripts to likewise generate output (such as error messages) encoded in UTF-8. The default value of this option isOff
, which means that mod_dav_svn assumes a 7-bit ASCII encoding for its hook script interactions. This option is available as of Subversion 1.8.650) this.width=650;" src="https://imgs.dedegg.com/upload/getfiles/default/2022/11/8/20221108055955091.jpg" />
Administrators should ensure that the character set and encoding expectations of hook scripts match all the ways they might be invoked. For example, if one repository is served by both httpd and svnserve, svnserve should also be configured to use UTF-8 (by setting an appropriate locale in its environment) if this option is enabled for mod_dav_svn. Also, local filesystem paths containing non-ASCII characters which will be accessed by those scripts (such as repository root paths) must be properly encoded in the filesystem to match the scripts‘ expectations.
最后,在apache的配置文件httpd.conf里添加
<IfModule mod_dav_svn.c>
SVNUseUTF8 On
</IfModule>
重启apache,问题解决!!
当然 这个参数只在1.8版本中有效。
本文出自 “无所适从” 博客,请务必保留此出处http://tommypage.blog.51cto.com/6689011/1925166
subversion-1.8.17+apache2.2.32 http无法访问中文仓库名
原文:http://tommypage.blog.51cto.com/6689011/1925166
本文标题为:subversion-1.8.17+apache2.2.32 http无法访问中文仓库名


基础教程推荐
- Centos7 nginx的安装以及开机自启动的设置 2023-09-22
- 通过StatefulSet部署有状态服务应用实现方式 2022-10-01
- Apache CarbonData 1.0.0发布及其新特性介绍 2023-09-11
- 为Win2003服务器打造铜墙铁壁的方法步骤 2022-09-01
- Centos 安装Django2.1 2023-09-24
- RFO SIG之openEuler AWS AMI 制作详解 2022-12-28
- Docker容器操作方法详解 2022-11-13
- windows环境下apache-apollo服务器搭建 2023-09-10
- Apache Kafka 2.5 稳定版发布,新特性抢先看 2023-09-11
- P3 利用Vulnhub复现漏洞 - Apache SSI 远程命令执行漏洞 2023-09-10