Terminal in Mac: Put files in FTP Server
I put files in the FTP server using my Macintosh Terminal. I use the command
"PUT filename.txt"
while doing this the text file which is an UTF-16 gets to the ftp server b开发者_如何转开发ut do not retain the DoubleByte characters (E.g: Japanese Characters). I believe this is because I did not specify a file format for destination.
What is the command to be used to specify the Destination "File Format" "Type", "Structure" etc.
The default FTP type is ascii. Before you PUT your file, you might first change your type to binary.
Here is how it looks at my prompt:
ftp> binary
200 Type set to I
I used BBEdit to save the file as UTF-8 and then sent the file to the server. This worked fine.
BBEdit gave me the option to save the file as UTF-8 Unix format. When i used Excel, Access or anyother software which do not have UTF-8 unix format (they have UTF-8 Windows) as saving, the text file is getting issues . Unix gets crazy with non english characters with UTF-8 Windows encoding.
精彩评论