LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 849|回复: 2

有没人打过gftp的补丁呢,教教我

[复制链接]
发表于 2006-12-25 14:47:00 | 显示全部楼层 |阅读模式
如题,我按wiki上写的 :
ftp乱码

很多ftp站点是GBK编码,如果使用UTF8的locale,下载的文件名可能会乱码。对于lftp,在.lftp/rc下做如下设置

set ftp:charset "gbk"
set file:charset "UTF-8"

对于gftp,可以在.gftp/gftprc中做如下设置即可正确显示服务器端gbk编码的文件名

remote_charsets=gb2312

但下载下来的文件名仍然是乱码,此时需要打补丁。补丁地址为: http://www.teatime.com.tw/%7Etom ... mote_charsets.patch
下载patch文件,现在不知道该怎么打这个补丁,在/usr/share/gftp目录下直接:
patch patch.file 提示出错,出错信息如下:
[root@myhost gftp]# patch < gftp_remote_charsets.patch
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur gftp-2.0.18/lib/local.c gftp-2.0.18.patched/lib/local.c
|--- gftp-2.0.18/lib/local.c    2005-02-02 09:24:51.000000000 +0800
|+++ gftp-2.0.18.patched/lib/local.c    2005-02-28 14:41:00.000000000 +0800
--------------------------
File to patch:
发表于 2006-12-25 16:49:03 | 显示全部楼层
从不用gftp
用lftp吧  一般都能自动识别charset,实在不行,就用set ftp:charset=gbk就OK了
回复 支持 反对

使用道具 举报

发表于 2006-12-27 08:23:46 | 显示全部楼层
把gftp的命令改成LANG="zh_CN.gbk" gftp

may it helps
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表