Windows files are copied to Linux garbled, convert file name encoding

Source: Internet
Author: User

    1. Objective

      Windows Chinese system, the default encoding is GB2312, and the Linux system default encoding is UTF-8. To display correctly, either modify the Linux system encoding to GB2312, or modify the filename encoding (the file content is not modified).

      Obviously we choose the second, modify the file name encoding.

    2. Installation

CentOS System command:

Yum-y Install CONVMV

Debian system command:

Apt-get Install CONVMV

command to use

Format: convmv-f source code-T new encoding [options] File name/directory name

Gb2312->utf-8

Convmv-f gb2312-t UTF-8--notest-r catalog convmv-f gb2312-t UTF-8--notest test. txt


Command explanation:

The-f parameter indicates the encoding before conversion;

-T is the converted encoding;

-R Recursive processing sub-folder;

--notest the actual operation, please note that the default is not to do real operation of the file, but only the experiment;


Note: If the files in the Linux system have been shown as garbled, the direct copy is garbled and pasted on the command line.




Reference article:

Http://blog.sina.com.cn/s/blog_4b3646350100kugp.html

http://blog.csdn.net/jnbbwyth/article/details/6991425


This article is from the "Enlightened Grocery store" blog, please be sure to keep this source http://wutou.blog.51cto.com/615096/1828376

Windows files are copied to Linux garbled, convert file name encoding

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.