今天在down代码时遇到了例如以下问题:

[xxx@xxx ~]$ svn co https://xxxxxxxxxxxxx

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

svn: xxxxxxxx/include/xml_inc/XML/?\194?\184?

\194?

\180?\194?\188?\195?

\190 mcXML.h

这个问题主要是代码中包括了中文名字的文件,svn这边的编码不支持造成的。

在网上查了一些资料,基本上都是用以下的方法。可是都无论用(切割线以内的是不好使的方法)

==========================================切割线==========================================

由于SVNclient须要utf8来支持中文。

解决的方法非常easy,正确设置当前系统的 locale:

export LC_CTYPE=zh_CN.UTF-8

或者

export LC_CTYPE=en_US.UTF-8 (我设的是en_US.UTF-8)

然后又一次 checkout 就可以。

假设  export LC_CTYPE=zh_CN.UTF-8 提示

warning:> locale

locale: Cannot set LC_CTYPE to default locale: No such file ordirectory

locale: Cannot set LC_MESSAGES to default locale: No such file ordirectory

locale: Cannot set LC_ALL to default locale: No such file ordirectory  等信息

能够尝试

locale-gen en_US.UTF-8

==========================================切割线==========================================

用了上面的这些方法之后:

[xxx@xxx ~]$ svn update         

svn: Error converting entry in directory 'xxxxxxxx/include/xml_inc/XML' to UTF-8

svn: Valid UTF-8 data

(hex:)

followed by invalid UTF-8 sequence

(hex: b8 b4 bc fe)

还是不行

问了一下其它同事的解决的方法:

将.bashrc中加上这么一行:

export LANG=zh_CN.GB18030

[xxx@xxx ~]$ locale

LANG=zh_CN.GB18032

LC_CTYPE="en_US.UTF-8"

LC_NUMERIC="en_US.UTF-8"

LC_TIME="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_MONETARY="en_US.UTF-8"

LC_MESSAGES="en_US.UTF-8"

LC_PAPER="en_US.UTF-8"

LC_NAME="en_US.UTF-8"

LC_ADDRESS="en_US.UTF-8"

LC_TELEPHONE="en_US.UTF-8"

LC_MEASUREMENT="en_US.UTF-8"

LC_IDENTIFICATION="en_US.UTF-8"

LC_ALL=en_US.UTF-8

这样就好使了,下载途中另一点小问题。会出现

svn: 方法 REPORT 失败于 “/xxxxxx/!svn/vcc/default”: 200 OK (https://xxxxxxxxxxxxxxx)



我们无论它,直接再运行以下语句就可以解决svn的问题

[xxx@xxx ~]$ svn update

svn: Can't convert string from 'UTF-8' to native encoding 解决的方法的更多相关文章

  1. SVN遇到Can't convert string from 'UTF-8' to native encoding

    刚配好mysql,svn co代码的时候遇到问题 svn: Can't convert string from 'UTF-8' to native encoding: svn: platform/co ...

  2. svn: Can't convert string from 'UTF-8' to native encoding: 解决办法

    在linux中,svn co 或 svn up 时有中文文件名的文件的话,可能会报下面的错: [root@linkea-dev-srv1 ~]# svn upsvn: Can't convert st ...

  3. SVN遇到Can't convert string from 'UTF-8' to native encoding(转)

    svn: Can't convert string from 'UTF-8' to native encoding: svn: platform/console-framework/portal/im ...

  4. svn: Can’t convert string from ‘UTF-8’ to native encoding: 解决办法

    主要原因是linux的编码发生改动 只需该为 en_US.UFT-8即可 [具体操作可以查看]https://www.cnblogs.com/sz-xioabai/p/10523423.html

  5. svn: Can't convert string from 'UTF-8' to native encoding 的解决办法(转)

    http://www.cnblogs.com/xuxm2007/archive/2010/10/26/1861223.html svn 版本库中有文件是以中文字符命名的,在 Linux 下 check ...

  6. 【转载】解决 Subversion 的 “svn: Can't convert string from 'UTF-8' to native encoding” 错误

    转载自:http://blog.csdn.net/shaohui/article/details/3996274 在google code 上创建了一个新的项目, 用Windows 下面的tortoi ...

  7. svn: Can't convert string from 'UTF-8' to native encoding 的解决办法

    http://www.leakon.com/archives/610 http://www.toplee.com/blog/566.html http://svnbook.red-bean.com/e ...

  8. svn: Can't convert string from 'UTF-8' to native

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt227 svn 版本库中有文件是以中文字符命名的,在 Linux 下 chec ...

  9. svn错误:Can't convert string from 'UTF-8' to native encoding

    如果文件名包含了中文,当执行"svn up ."遇到如下错误时: svn: Can't convert string from 'UTF-8' to native encoding ...

随机推荐

  1. GIMP类似于PhotoShop的开源免费软件

    首先我们先看看他的界面如何,都有哪些功能!而且它支持多种平台,可以在MacOS.Windows.Linux操作系统上使用.非常值得推荐! ​ 1.官方地址下载地址: https://www.gimp. ...

  2. Varnish 问题点 与 技术方案 Varnish 优劣分析

      A10 有没有能做热点统计   1 Varnish 分布式 HA  (目前没有HA) 2 Varnish 热点监控     (建议热点需要外部插件统计,API的话目前并木有发现,但是他自带一个伪热 ...

  3. 我看Java二十年:它是怎样永远改变编程的。

    转自jdon的小文章:来自Infoworld的一篇纪念mod=viewthread&tid=3042" target="_blank">Java诞生20周年 ...

  4. 【POJ3377】Ferry Lanes 最短路

    我仅仅是贴一下手写堆优化的dij模板.尽管.它.TLE了--**** #include <cstdio> #include <cstring> #include <ios ...

  5. php中局部变量和全局变量

    php中局部变量和全局变量 代码1:函数内部使用函数外部变量错误方法 <?php $name = 'fish'; function animal() { echo $name; } animal ...

  6. jquery ajax中支持哪些返回类型以及js中判断一个类型常用的方法?

    1 jquery ajax中支持哪些返回类型在JQuery中,AJAX有三种实现方式:$.ajax() , $.post , $.get(). 预期服务器返回的数据类型.如果不指定,jQuery 将自 ...

  7. Spring Security 4 Method security using @PreAuthorize,@PostAuthorize, @Secured, EL--转

    原文地址:http://websystique.com/spring-security/spring-security-4-method-security-using-preauthorize-pos ...

  8. LINQ的基本语法包含如下的8个上下文关键字,这些关键字和具体的说明如下

    出于工作需要,准备把LINQ的相关知识梳理一遍,希望能填补下之前学习漏掉的或是没有注意的地方,也为未来减轻压力~ LINQ查询表达式的基本语法很容易掌握,它使用C#常见的语言构造,从外观上看,和我们常 ...

  9. JS实现PC端全兼容复制

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  10. Ubuntu系统下的多路径软件 DM Multipath 配置。

    Ubuntu系统下的多路径软件是操作系统自带的 DM Multipath工具.------------------------------------------------------------- ...