svn: Can't convert string from 'UTF-8' to native encoding 解决的方法
今天在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 解决的方法的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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
- 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 ...
- 【转载】解决 Subversion 的 “svn: Can't convert string from 'UTF-8' to native encoding” 错误
转载自:http://blog.csdn.net/shaohui/article/details/3996274 在google code 上创建了一个新的项目, 用Windows 下面的tortoi ...
- 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 ...
- svn: Can't convert string from 'UTF-8' to native
详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt227 svn 版本库中有文件是以中文字符命名的,在 Linux 下 chec ...
- svn错误:Can't convert string from 'UTF-8' to native encoding
如果文件名包含了中文,当执行"svn up ."遇到如下错误时: svn: Can't convert string from 'UTF-8' to native encoding ...
随机推荐
- HDU 4906 Our happy ending
题意: Given a sequence a_1,a_2,...,a_n, if we can take some of them(each a_i can only be used once), a ...
- Thinking in UML 学习笔记(三)——UML核心视图之类图
类图的作用:用于展示系统中的类及其相互之间的关系. UML在解决面向对象的方法中对类理解为三个层次,各自是:概念层.说明层.实现层.在UML中,从開始的需求到终于设计类,类图也是环绕这三个层次的观点进 ...
- PowerShell中和服务相关的命令
New-Service https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-s ...
- 10.MongoDB:将Json数据直接写入MongoDB的方法
Json转Bson MongoDB中是以Bson数据格式进行存储的,Json字符串没有办法直接写入MongoDB 可以将Json字符串转换成DBObject或者Document,然后写入MongoDB ...
- netflix turbine概述
1.turbine是什么?它的作用是什么? Turbine is a tool for aggregating streams of Server-Sent Event (SSE) JSON data ...
- UVC和V4L2的关系(转载)
UVC是一种usb视频设备驱动.用来支持usb视频设备,凡是usb接口的摄像头都能够支持 V4L2是Linux下的视频采集框架.用来统一接口,向应用层提供API UVC: USB video clas ...
- JS数组去重的6种算法实现
1.遍历数组法 最简单的去重方法,实现思路:新建一新数组,遍历传入数组,值不在新数组就加入该新数组中:注意点:判断值是否在数组的方法"indexOf"是ECMAScript5 方法 ...
- Spring MVC源码——Servlet WebApplicationContext
上一篇笔记(Spring MVC源码——Root WebApplicationContext)中记录了下 Root WebApplicationContext 的初始化代码.这一篇来看 Servlet ...
- cogs 1405. 中古世界的恶龙[The Drangon of Loowater,UVa 11292]
1405. 中古世界的恶龙[The Drangon of Loowater,UVa 11292] ★ 输入文件:DragonUVa.in 输出文件:DragonUVa.out 简单对比时间 ...
- 零基础学python-7.6 字符串格式化表达式
字符串格式化同意在一个单个的步骤中对一个字符串运行多个特定类型的替换 特别是给用户提示的时候,格式化很方便 实现方法: 1.格式化表达式,类似于c语音的printf 在表达式中,我们使用%二进制操作符 ...