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

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

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

#1

帖子 yulewang » 2006-10-03 3:07

rt. I use NCFTP, and the remote server use gb2312 encoding.
CN.Tink
帖子: 13
注册时间: 2006-10-01 2:18

#2

帖子 CN.Tink » 2006-10-03 5:47

用火狐的DownThemAll插件试试呢!
头像
karron
帖子: 6226
注册时间: 2005-06-11 14:03
来自: 不明真相的群众
联系:

#3

帖子 karron » 2006-10-03 8:16

我用kftpgrabber,远程encoding设置为gbk,下载下来的东西很正常.
我的blog,关于技术,软件,linux,vim <---- 所有博客均被河蟹.
头像
stlxv
论坛版主
帖子: 8275
注册时间: 2006-05-03 0:39
来自: المريخ

#4

帖子 stlxv » 2006-10-03 10:04

设置好编码
PHP是最好的语言!不服来战!
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

#5

帖子 yulewang » 2006-10-03 19:22

你写一个试试看,要求双方互传都没有乱码。我这里utf8,主机gbk
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#6

帖子 eexpress » 2006-10-03 19:30

yulewang 写了:你写一个试试看,要求双方互传都没有乱码。我这里utf8,主机gbk
那你需要先找人重写win下面的ftp软件阿。
● 鸣学
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

#7

帖子 yulewang » 2006-10-03 19:32

刚才一位仁兄说改动配置文件,设置好编码。我让他改改看而已,至少我这里是不成功的。我用 ncftp
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#8

帖子 eexpress » 2006-10-03 19:40

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

论坛还有很多老帖子,说明过不同版本的ftp软件的设置编码的事情。可以熟悉历史阿。 :lol:
● 鸣学
suqianstone
帖子: 2
注册时间: 2006-02-07 21:43

#9

帖子 suqianstone » 2006-10-03 20:11

http://stone.sqhard.net
不是宣传自己,是我记录在那里了!这个解决方法也是看来的 !只是我后面坚持下来了!而有的人就放弃了 !
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

#10

帖子 yulewang » 2006-10-04 3:19

不用你宣传自己,人家就是喜欢使用ntftp,用了好几年了,习惯了,改不掉了,怎么办?
再说ncftp也是linux系统中最强大的ftp客户端之一。
以前使用gb2312的locale,一点问题也没有,今年八月份安装了hiweed,换到了utf-8,方便是方便了,但是和其他机器兼容的问题就出现了,emacs,ncftp....无穷的问题。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#11

帖子 eexpress » 2006-10-04 22:25

lz贴图看看,最好说明一下。为什么ntftp这么好阿。
linux应该是i18n才好阿。gb2312的,可以运行软件的前面加export环境变量这样,得到gb2312的locale阿。
● 鸣学
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

#12

帖子 yulewang » 2006-10-05 0:16

使用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:~$
yulewang
帖子: 154
注册时间: 2006-08-12 22:00

#13

帖子 yulewang » 2006-10-05 0:17

也就是说,如果我把ftp的环境设成utf,那么服务器的信息无法正常显示。
如果把ftp的环境设成gbk,那么下载下来的信息就不对。
leeyee
帖子: 723
注册时间: 2006-04-11 9:01

#14

帖子 leeyee » 2006-10-05 10:32

我是用lftp远程下载的,一般都是用set命令设置一下编码

代码: 全选

$ lftp
lftp: ~>set ftp:charset gbk
I would love to change the world, but they won't give me the source code.
http://hi.baidu.com/wienerlee
回复