Svn: Can & amp; #39; tconvertstringfrom & amp; #39; UTF-8 & amp; #39; tonativeencoding Solution

Source: Internet
Author: User
Tags svn client svn update

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.