且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SVN错误:无法将字符串从本机编码转换为"UTF-8"

更新时间:2023-11-27 10:59:40

  1. 它不会更改文件的编码.它将文件名的编码更改(更改为每个客户端都希望能理解的名称).
  2. 由谁允许? NTFS使用16位代码点,Windows可以根据您的要求公开各种编码的文件名(它将尝试将其转换为您要求的编码).现在...这一点(您的要求)取决于您使用的特定svn客户端.在我看来,这就像是TortoiseSVN中的错误.

编辑以添加:

U.我误解了症状. svn服务器将所有内容都存储在utf-8中(似乎已经成功完成了此操作).

Ugh. I misunderstood the symptoms. the svn server stores everything in utf-8 (and it seems that it did that successfully).

提交后挂钩是无法从UTF-8转换的位.如果我正确理解了您的意思,则服务器上的提交后挂钩会触发对共享驱动器的svn更新(因此svn服务器会为其自身启动svn客户端...)?这意味着需要固定的配置是服务器上的客户端 的配置. 在执行svn服务器的环境中检查LANG/LC_ALL..碰巧的是,挂钩在真空环境(请参阅提示).因此,您应该在挂钩本身中设置变量.

The post-commit hook is the bit that fails to convert from UTF-8. If I understand what you're saying correctly, the post-commit hook on the server triggers an svn update to a shared drive (the svn server therefore starts an svn client to itself...) ? This means that the configuration that needs to be fixed is the one for the client on the server. Check the LANG / LC_ALL on the environment executing the svn server.. As it happens, the hooks are run in a vacuum environment (see Tip). So you should set the variable in the hook itself.

另请参见此页面以获取有关如何操作的信息svn处理本地化

See also this page for info on how svn handles localisation