Svn: Can & #39; tconvertstringfrom & #39; UTF-8 & #39; tonativeencoding Solution
The following problems were encountered during code down today:
[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
This problem mainly occurs when the Code contains a file with a Chinese name, which is not supported by svn encoding.
I checked some information on the Internet and basically used the following methods, but they all did not work (it is difficult to use the method within the split line)
========================================================== ===================================================== =====
Because the SVN client needs utf8 to support Chinese characters.
The solution is simple. Set the locale of the current system correctly:
Export LC_CTYPE = zh_CN.UTF-8
Or
Export LC_CTYPE = en_US.UTF-8 (I set the en_US.UTF-8)
Then, run the checkout command again.
If the export LC_CTYPE = zh_CN.UTF-8 prompt
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 and other information
You can try
Locale-gen en_US.UTF-8
========================================================== ===================================================== =====
After using these methods:
[Xxx @ xxx ~] $ Svn update
Svn: Error converting entry in directory 'xxxxxxxx/include/xml_inc/xml' to UTF-8
Svn: Valid UTF-8
(Hex :)
Followed by invalid UTF-8 sequence
(Hex: b8 b4 bc fe)
Still not good
I asked other colleagues about the solution:
Add the following line to. 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
In this way, there will be a small problem during the download process.
Svn: The REPORT method failed to be "/xxxxxx /! Svn/vcc/default ": 200 OK (https: // xxxxxxxxxxxxxxx)
We can solve the svn problem by directly executing the following statement.
[Xxx @ xxx ~] $ Svn update