分页: 1 / 1

如何使得从远程ftp下载的文件名不是乱码?

发表于 : 2006-10-03 3:07
yulewang
rt. I use NCFTP, and the remote server use gb2312 encoding.

发表于 : 2006-10-03 5:47
CN.Tink
用火狐的DownThemAll插件试试呢!

发表于 : 2006-10-03 8:16
karron
我用kftpgrabber,远程encoding设置为gbk,下载下来的东西很正常.

发表于 : 2006-10-03 10:04
stlxv
设置好编码

发表于 : 2006-10-03 19:22
yulewang
你写一个试试看,要求双方互传都没有乱码。我这里utf8,主机gbk

发表于 : 2006-10-03 19:30
eexpress
yulewang 写了:你写一个试试看,要求双方互传都没有乱码。我这里utf8,主机gbk
那你需要先找人重写win下面的ftp软件阿。

发表于 : 2006-10-03 19:32
yulewang
刚才一位仁兄说改动配置文件,设置好编码。我让他改改看而已,至少我这里是不成功的。我用 ncftp

发表于 : 2006-10-03 19:40
eexpress
不同的ftp软件,配置都不同。说不定ncftp就不支持呢。试试gftp。它的ssh2也代了,很好用的,我就是用它操作其他的linux主机,作复制大文件用的。它的每种协议都有远程编码的设置,就在菜单里面。我是没有gbk的ftp帐号,要不就可以测试的。

论坛还有很多老帖子,说明过不同版本的ftp软件的设置编码的事情。可以熟悉历史阿。 :lol:

发表于 : 2006-10-03 20:11
suqianstone
http://stone.sqhard.net
不是宣传自己,是我记录在那里了!这个解决方法也是看来的 !只是我后面坚持下来了!而有的人就放弃了 !

发表于 : 2006-10-04 3:19
yulewang
不用你宣传自己,人家就是喜欢使用ntftp,用了好几年了,习惯了,改不掉了,怎么办?
再说ncftp也是linux系统中最强大的ftp客户端之一。
以前使用gb2312的locale,一点问题也没有,今年八月份安装了hiweed,换到了utf-8,方便是方便了,但是和其他机器兼容的问题就出现了,emacs,ncftp....无穷的问题。

发表于 : 2006-10-04 22:25
eexpress
lz贴图看看,最好说明一下。为什么ntftp这么好阿。
linux应该是i18n才好阿。gb2312的,可以运行软件的前面加export环境变量这样,得到gb2312的locale阿。

发表于 : 2006-10-05 0:16
yulewang
使用luit设置当前的编码环境
yulewang@yulewang-laptop:~$ luit -encoding gbk
Warning: couldn't find charset data for locale en_US.UTF-8; using ISO 8859-1.



运行ncftp
yulewang@yulewang-laptop:~$ ncftp
NcFTP 3.1.9 (Mar 24, 2005) by Mike Gleason (http://www.NcFTP.com/contact/).



打开书签
ncftp> open myftp
Connecting to @@@.@@@.@@@.@@(ip我就不显示了)...
Serv-U FTP Server v6.0 for WinSock ready...
Logging in...
User logged in, proceed.
Logged in to 166.111.41.149.

显示我要下载的档,非常正常
ncftp / > cd class
Note:453.70 MB available
Directory changed to /class
ncftp /class > ls
通讯录及其他信息/


下载档
ncftp /class > get -R 通讯录及其他信息/
通讯录及其他信息/2006版建环5通讯录.xls: 19.50 kB 516.75 kB/s
通讯录及其他信息/本科生基本情况统计_建环5.doc: 1.86 MB 7.52 MB/s
ncftp /class > bye


显示本地档,第一行最左边的出来一些,最右边的是utf8编码的一个文件夹
yulewang@yulewang-laptop:~$ ls
通讯录????????息 gould mail phyexpr thermoexec1.aux 闊 ╅洩
date hello Marx physics thermoexec1.dvi
Desktop hydrodynamics meta pix thermoexec1.log
DSC00890.JPG image micro.txt social thermoexec1.tex
economics important music text time
experiment lshort.pdf pass thermodynamics wiki


退出luit重新显示文件
yulewang@yulewang-laptop:~$ exit
exit
yulewang@yulewang-laptop:~$ ls
ͨѶ¼????????Ϣ gould mail phyexpr thermoexec1.aux 韩雪
date hello Marx physics thermoexec1.dvi
Desktop hydrodynamics meta pix thermoexec1.log
DSC00890.JPG image micro.txt social thermoexec1.tex
economics important music text time
experiment lshort.pdf pass thermodynamics wiki
yulewang@yulewang-laptop:~$

发表于 : 2006-10-05 0:17
yulewang
也就是说,如果我把ftp的环境设成utf,那么服务器的信息无法正常显示。
如果把ftp的环境设成gbk,那么下载下来的信息就不对。

发表于 : 2006-10-05 10:32
leeyee
我是用lftp远程下载的,一般都是用set命令设置一下编码

代码: 全选

$ lftp
lftp: ~>set ftp:charset gbk