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://pic.womengda.cn/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无法访问中文仓库名
基础教程推荐
- nginx.conf(centos7 1.14)主配置文件修改 2023-09-23
- linux之conda环境安装全过程 2023-07-11
- Apache Hudi数据布局黑科技降低一半查询时间 2022-10-06
- IIS 6 的 PHP 最佳配置方法 2022-09-01
- centos 7 安装及配置zabbix agent 2023-09-24
- 服务器添加git钩子的步骤 2022-12-12
- apache和nginx结合使用 2023-09-10
- 实战Nginx_取代Apache的高性能Web服务器 2023-09-29
- Apache服务器配置攻略3 2022-09-01
- linux下安装apache与php;Apache+PHP+MySQL配置攻略 2023-08-07