When Linux used SVN, there was an error, that is, can ' t convert string from ' UTF-8 ' to native encoding, which is mainly caused by the coding format, the following small series to introduce the solution to the problem.
In Linux, SVN Co, svn up, or svnc cleanup, if there is a file in Chinese file name below the error:
Svn:can ' t convert string from ' UTF-8 ' to native encoding:
svn:src/main/webapp/resources/js/my97datepicker/?229?188?128?229?143?145?229?140?133
The first line generally means that the string cannot be converted from UTF-8 encoding to local, mainly because the SVN client needs UTF8 to support Chinese.
The second line of reimbursement of the file path to view the file under its path, must be a Chinese-named file. Therefore, you need to view the system encoding 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= "C"
lc_identification= "C"
Lc_all=c
You just need to modify the Bash_profile file to add the following lines:
Export Lc_all=en_us. UTF-8
Export Lang=en_us. UTF-8
Export Language=en_us. UTF-8
And then Source:
。 ~/.bashrc
At this point, the SVN operation will no longer report Svn:can ' t convert string from ' UTF-8 ' to native encoding: wrong.
Another solution
The solution is simple, locale the current system correctly:
Export Lc_ctype= "ZH_CN. Utf-8″
And then checkout it again.
Note that depending on your system character set variables, if zh_cn. UTF-8 not, it is possible to change into GB2312:
Export Lc_ctype= "ZH_CN. Gb2312″
In addition, some variable names are different, using the following:
Export lang= "ZH_CN. Utf-8″
The above is the Linux svn error can ' t convert string from the solution introduced, there are two ways to solve the second method is relatively simple but not necessarily able to solve the SVN error problem.