cvsnt-server-2.5.05.3489文件存储格式问题(急需解决)

xezhe198 2012-10-25 11:55:45
大侠们好,
我原来用的WIN 2003SEVER 安装的cvsnt-2.5.03.2382
更换服务器后用WIN 2008SEVER 安装cvsnt-server-2.5.05.3489(cvsnt-2.5.03.2382 在2008上不能用了)
然后将原来WIN 2003SEVER cvsnt-2.5.03.2382下文件仓库移到新的服务器上提示:

XML error at line 6: Input is not proper UTF-8, indicate encoding !

Bytes: 0xD0 0xC2 0xBD 0xA8

我查看了服务器上的‘CVS’文件夹下的“fileattr”文档,老服务器上的文档均为
<?xml version="1.0" encoding="UTF-8"?>
<fileattr>
<directory>
<owner>libaowei</owner>
</directory>
</fileattr>

新服务器如果新件文档都为:

<?xml version="1.0"?>
<fileattr>
<file name="X1.doc">
<watcher name="libaowei"/>
</file>
</fileattr>
如果在老文件夹下建新文档则为:
<?xml version="1.0" encoding="UTF-8"?>
<fileattr>
<directory>
<owner>xiyingying</owner>
</directory>
<file name="新建 Microsoft Word 文档.doc">
<watcher name="setup"/>
</file>
</fileattr>
这就出错误了。
急需解决。
...全文
425 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xezhe198 2012-11-05
  • 打赏
  • 举报
回复
个人认为可能不是编码问题,因为只要我修改了服务器的文件(‘CVS’文件夹下的“fileattr”文档)。文件就能从服务器上取出来,也可以提交。现在我将‘CVS’文件夹下的“fileattr”文档改为只读格式。文档可以取出、提交、新增都无问题。还请高手指教。
  • 打赏
  • 举报
回复
可以确认是编码问题,但不是BOM。而是你在老文件夹下建新文档时的编码根本不是UTF8,而是ANSI。
你上面说的“Bytes: 0xD0 0xC2 0xBD 0xA8”,是ANSI(GBK)编码下的“新建”。正好对应你新建文档里面的“<file name="新建 Microsoft Word 文档.doc">”,因为“新建”后面是英文,所以只读取到这部分就出错了,后面的“文档”都没有机会读到。
如果只有英文的话,一般不会提示编码问题,只有存在这种双字节特殊字符时容易出问题。
所以你应该检查一下你现在环境的设置,看看其中对生成文件的编码是否是设为ANSI(或GBK/GB2312),将其改为UTF8,之后再新建。
对已有的ANSI编码文件,找个批量转换软件转换成UTF8。之后就OK了。
xezhe198 2012-10-29
  • 打赏
  • 举报
回复
请问有具体解决方法吗,能否赐教?
xezhe198 2012-10-29
  • 打赏
  • 举报
回复
我用的客户端是TortoiseCVS1.10.9.
  • 打赏
  • 举报
回复
跟内容没有直接关系,至少这一步的问题还不是.

XML error at line 6: Input is not proper UTF-8, indicate encoding !
Bytes: 0xD0 0xC2 0xBD 0xA8
这个提示,想告诉你的是文件保存的编码异常.
原因应该是你的新旧系统,对UTF8保存和读取时是否插入BOM标记字节的设置有差异.
比如有一方要求必须有BOM,写入时也会写入BOM.而另一方不要求也不写入.
这样,当一方读取另一方的文件时,就会因为这个差异而拒读.

具体官方资料:
Some combinations were not available on older CVS versions so be careful if you want to access your repository from older clients. The CVSNT server will automatically downgrade some of these options if an older client fetches a file.

Encodings:
Use an extended encoding. Any encoding supported by the client-side iconv library can be used, however beware of mismatches between clients (the Win32 version does not currently support EBCIDIC encodings for example). The following list will work on all platforms that are using Unicode-capable CVSNT:
ucs2le, utf16le
Little-endian UCS-2 without BOM.
ucs2be, utf16be
Big-endian UCS-2 without BOM.
ucs2le_bom, utf16le_bom
Little-endian UCS-2 with BOM.
ucs2be_bom, utf16be_bom
Big-endian UCS-2 with BOM.


1,277

社区成员

发帖
与我相关
我的任务
社区描述
软件工程 CVS/SVN
社区管理员
  • 版本控制社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧