Windows files copied to Linux garbled-workaround

Source: Internet
Author: User


From Linux to the Windows copy files or from Windows to Linux copy files, sometimes the Chinese file name garbled, the cause of this problem is because the Windows file name Chinese encoding defaults to GBK, and the default file name in Linux is encoded as UTF8, Because the encoding is inconsistent, so the file name garbled problem, to solve this problem need to transcode the file name.
A tool convmv for file name encoding is provided specifically in Linux, which converts the file name from GBK to UTF-8 encoding, or from UTF-8 to GBK.


[[Email protected] images]# ls??? _20170808142307.png                 bg_1.png  icon10.png  n1.png                    qq?? 20170808124717.png20170814_3089106_1_1020482_30008_0.jpg  bg_2.png  icon11.png   n2.png                    qq?? 20170808124835.png20170814_3089107_2_1020482_30008_0.jpg  bg_3.png  icon1.jpg    n3.png                    qq?? 20170808125029.png20170814_3089108_3_1020482_30008_0.jpg  bg_4.png  icon2.png    n4.png                    QQ?? 20170808125556.png2017082301. jpg                           bg_5.png  icon3.png   n5.png                     SS1-1.png2017082302.JPG                           bg_6.png  icon4.png    nav_ico.png               ss1-2.png2.jpg                                     bg_7.jpg  icon5.png   peixuntu.jpg             ss1.png333.png                                   bg_9.jpg  icon6.png    ?????. png                transparent.gif444.png                                   f1.jpg    icon7.png   ??????. Png              xztb01.pngabout2_ wpsa087.tmp.png                   f2.jpg    icon8.png  &nBSP;??????. Png              xztb.pngabout2_ wpsa088.tmp.jpg                   f3.jpg    icon9.png   ??????. Png              ziliaoxiazai.pngabout2_ wpsa089.tmp.jpg                   f4.jpg    logo 1.jpg  ????????. png             ??????. pngabout2_wpsa08a.tmp.png                   f5.jpg    logo2.jpg   qq?? 20170808105711.pngabout3_wps8ba0.tmp.png              &Nbsp;    gywm.jpg  logo.png    qq?? 20170808124354.png (a lot of garbled when viewed) [[email protected] wwwroot]# yum install -y  convmv.noarch  (need to install this package) [[Email protected] test.com]# convmv -f gb2312 -t  UTF-8 --notest -r  Assets mv  "Assets/t/±¨±ls" "assets/t/Test Entry form." XLS "mv " Assets/t/.rar "" assets/t/exam simulator. rar "mv " assets/t/′.png "" assets/t/Proxy certificate. png "mv " assets/t/±¨±). xls "" Assets /t/Exam Entry Form (1). xls "mv " assets/upload/qq20170809100124.png "" Assets/upload/qq20170809100124.png "mv " Assets/upload/3jpg "" Assets/upload/xx.jpg "mv " assets/upload/ˉ.jpg "" Assets/upload/xx.jpg "mv " Assets/ Upload/a′jpg "" Assets/upload/xxx.jpg "mv " assets/upload/1.jpg "" Assets/upload/xxx.jpg "mv " Assets/upload /aμ 聦. jpg "" assets/upload/xxx.jpg "ready! as above is solved with CONVMV, as follows is its syntax: command use: Format:convmv -f  source code  -t  New encoding  [option]  file name/directory name gb2312->utf-812convmv -f gb2312 -t utf-8 --notest -r  Directory convmv -f gb2312 -t  utf-8 --notest  test. txt (note that the default in Windows is that gb2312  needs to be converted to Utf-8 in Linux, the command interpretation:-f  parameter is the encoding before the conversion;-t  is the converted encoding;-r  recursive processing subfolder;--notest  really do it, note that by default the file does not actually operate, but only the experiment)

hope to see the children's shoes a lot of advice, thank you! 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0063.gif "alt=" J_0063.gif "style=" Padding:0px;margin : 0px;vertical-align:top;border:none; "/>650) this.width=650;" src= "Http://img.baidu.com/hi/jx2/j_0063.gif" alt= "J_0063.gif" style= "padding:0px;margin:0px;vertical-align:top;border:none;"/>

Windows files copied to Linux garbled-workaround

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.