0

As we all know, Windows use ANSII to encode file name in file system, but Linux use UTF-8 by default. When I use SCP or FTP/SFTP to transfer files from windows to Linux, the transferred files will still encoded by ANSII. I want my Linux use UTF-8 only, so how can I recode the file name when transferring? I have known there are tools to convert, but can it convert automatically when I transferring them?

cck
  • 703
  • 6
  • 11
  • NTFS, which still is the major filesystem in the Windows world I think, uses UTF-16. Can you make an example of the problem you are encountering? – Pekka Jan 11 '16 at 16:05

1 Answers1

-1

This is a known situation that happeds when you transfer file from windows to linux.

The utilities dos2unix and unix2dos are available for converting files from the Unix command line.

To convert a Windows file to a Unix file, enter:

dos2unix winfile.txt unixfile.txt

To convert a Unix file to Windows, enter:

unix2dos unixfile.txt winfile.txt
Oz Bar-Shalom
  • 1,747
  • 1
  • 18
  • 33
  • The OP needs to convert the filenames, not the file contents. dos2unix and unix2dos convert file contents between DOS-style line terminators and unix-style line terminators. – Kenster Jan 13 '16 at 15:25