无法将字符串从 'UTF-8' 转换为本机编码以进行 pysvn 导出

Can't convert string from 'UTF-8' to native encoding for pysvn export

我是 运行 pysvn 导出的 repo,其文件名带有法文字母,如 "Français" 或 "Spécifications du produit"。导出运行时,返回如下错误

Can't convert string from 'UTF-8' to native encoding

我找到了这个http://refactor.se/2007/08/13/svn-fix-cant-convert-string-from-utf-8-to-native-encoding/ and Can't convert string from 'UTF-8' to native encoding

指示有关设置本地语言的内容,但我在 pysvn 中找不到。是否可以在初始化 pysvn 客户端时设置它?

编辑:忘了说我是在 django 1.7 上做的

谢谢

以防将来有人遇到这个问题,我所做的是在这个文件中从 pysvn 复制了 initLocale() 函数

http://pysvn.tigris.org/source/browse/pysvn/trunk/pysvn/Extension/Examples/Client/svn_cmd.py?view=log

然后在svn Client初始化之前调用这个。 SVN 之后工作