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://oss.womengda.net/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无法访问中文仓库名


- IIS搭建ftp服务器的详细教程 2022-11-15
- KVM虚拟化Linux Bridge环境部署的方法步骤 2023-07-11
- CentOS7安装GlusterFS集群的全过程 2022-10-10
- nginx中封禁ip和允许内网ip访问的实现示例 2022-09-23
- 解决:apache24 安装后闪退和配置端口映射和连接超时设置 2023-09-11
- 【转载】CentOS安装Tomcat 2023-09-24
- 利用Docker 运行 python 简单程序 2022-10-16
- CentOS_mini下安装docker 之 安装docker CE 2023-09-23
- 教你在docker 中搭建 PHP8 + Apache 环境的过程 2022-10-06
- 阿里云ECS排查CPU数据分析 2022-10-06