Chinese file name garbled in the CentOS system

Source: Internet
Author: User

Originally from: http://www.zhukun.net/archives/7434

Chinese file name garbled in the CentOS system2014/09/01Linux op centos, Linux Bear

Files or directories uploaded from Windows to Linux are displayed as garbled in the Linux system. Although the Linux env is set to Lang=en_us. UTF-8, and the local shell client encoding is also set to UTF-8, but in the shell (or through HTTP access), is still garbled ...

The reason is that the name of the Windows Chinese encoding default is GBK, compressed or uploaded, the file name will also be GBK encoding, and Linux default file name is encoded as UTF8, because of inconsistent encoding, resulting in file name garbled problem, to solve this problem requires the file name transcoding.

wget http://pkgs.repoforge.org/convmv/convmv-1.15-1.el6.rf.noarch.rpmrpm -ivh convmv-1.15-1.el6.rf.noarch.rpm/usr/bin/convmv -f gbk -t utf-8 -r --notest /home/wwwroot

Common parameters:
-R recursive processing of subfolders
–notest real operation, by default it does not do real operation of the file
–list display of all supported encodings
–unescap can be escaped, such as to turn%20 into a space
-I interactive mode (asking for each conversion to prevent mis-operation)

There are many handy gadgets to convert your code under Linux:
Text content conversion Iconv
File name Conversion CONVMV
MP3 Label Conversion Python-mutagen

Chinese file name garbled in the CentOS system

Related Article

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.