Linux svn error Cant convert string from how to do?

  

Linux use svn, there is an error message, that is, can & lsquo; t convert string from & rsquo; UTF-8 & lsquo; to native encoding, which is mainly caused by the encoding format The problem, the following small series will introduce you to the solution to the problem.

In linux, svn co, when svn up or svnc cleanup, if there are Chinese file name of the file reported the following error:

svn: Can & rsquo; t convert string from & lsquo ;UTF-8’ to native encoding:

svn: src/main/webapp/resources/js/My97DatePicker/? 229?188?128?229?143?145?229?140?133

The first line basically means that you cannot convert a string from UTF-8 encoding to local, mainly because of the SVN client. Need utf8 to support Chinese.

The file path of the second line of reimbursement, look at the file under its path, it must be a file named in Chinese. So you need to check the system code file:

LANG=en_US.UTF-8

LC_CTYPE=“C”

LC_NUMERIC=“C”

LC_TIME=“C”

LC_COLLATE=“C”

LC_MONETARY=“C”

LC_MESSAGES=“C”

LC_PAPER =“C”

LC_NAME=“C”

LC_ADDRESS=“C”

LC_TELEPHONE=“C”

LC_MEASUREMENT=&ldquo ;C”

LC_IDENTIFICATION=“C”

LC_ALL=C

Just modify the bash_profile file and add the following lines:

export LC_ALL=en_US.UTF-8

export LANG=en_US.UTF-8

export LANGUAGE=en_US.UTF-8

Then source:

. ~/.bashrc

At this time, if you re-execute the SVN operation, you will not report svn: Can‘t convert string from ’UTF-8‘ to native encoding:

Another solution

The solution is simple, set the locale of the current system correctly:

export LC_CTYPE=“zh_CN.UTF-8″

Then recheck out.

Note that the variable is set according to your system character set. If zh_CN.UTF-8 does not work, it may be changed to GB2312:

export LC_CTYPE=”zh_CN.GB2312″

In addition, some variable names are different, using:

export LANG=“zh_CN.UTF-8″

The above is the Linux svn error can‘t convert string from The solution is described. There are two ways to solve it. The second method is relatively simple but does not necessarily solve the svn error problem.

Copyright © Windows knowledge All Rights Reserved