Search code examples
svnapache2localemod-dav-svn

Howto Config mod_dav_svn locale under apache2?


I have install and config ALL the apache2 & mod_dav_svn, but when access the http://host/svn/ , got this:

ps:the /mnt/svn/ is the parsent of all svn repos. and the repos is named using utf8 already.

os: ubuntu 11.10 server 64bit apache2 -v Server version: Apache/2.2.20 (Ubuntu) Server built: Feb 14 2012 16:35:38

locale: also export in /etc/apache2/envvars LANG=zh_CN.UTF-8 LANGUAGE=zh_CN LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_PAPER="zh_CN.UTF-8" LC_NAME="zh_CN.UTF-8" LC_ADDRESS="zh_CN.UTF-8" LC_TELEPHONE="zh_CN.UTF-8" LC_MEASUREMENT="zh_CN.UTF-8" LC_IDENTIFICATION="zh_CN.UTF-8" LC_ALL=zh_CN.UTF-8

[Wed Feb 29 14:54:34 2012] [notice] Apache/2.2.20 (Ubuntu) DAV/2 SVN/1.6.12 configured -- resuming normal operations

[Wed Feb 29 14:54:42 2012] [error] [client ] Unable to deliver content. [500, #0] [Wed Feb 29 14:54:42 2012] [error] [client *] couldn't fetch dirents of SVNParentPath [500, #22]

[Wed Feb 29 14:54:42 2012] [error] [client *] Error converting entry in directory '/mnt/svn' to UTF-8 [500, #22]

[Wed Feb 29 14:54:42 2012] [error] [client *] Can't convert string from native encoding to 'UTF-8': [500, #22]

[Wed Feb 29 14:54:42 2012] [error] [client *] ?\231?\160?\148?\229?\143?\145?\233?\131?\168?\231?\174?\161?\231?\144?\134 [500, #22]


Solution

  • edit /etc/apache2/envvars, change LANG from C to your locale language setting.

    I did the following modification, then restarted apache2, no more problem.

    export LANG=C --> export LANG="en_US.UTF-8"